Posted by Toby Inkster on 08/24/05 10:20
Luigi Donatello Asero wrote:
> Which code should I use to write in Chinese on my website?
<html lang="zh">
<title>我是 意大利人, 但是 我在主 瑞典</title>
<h1>我是 意大利人, 但是 我在主 瑞典</h1>
<p>我是 意大利人, 但是 我在主 瑞典</p>
</html>
and then save the file as UTF-16 and make sure you send a "Content-Type:
text/html; charset=utf-16" header. Easy.
How to set a header? As you're using PHP, it's as simple as including this
line at the top of any Chinese pages:
<? header("Content-Type: text/html; charset=utf-16"); ?>
If you're mixing Chinese and western languages on the same page, you might
find that using UTF-8 gives you smaller files.
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
[Back to original message]
|