|
Posted by Hilarion on 08/24/05 16:55
>> > 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.
>
>
> Can I configure Notepad or Wordpad to write Chinese?
> Do they support it?
On Windows XP they both do, because they support Unicode.
If by "write Chinese" you mean "save Chinese text in text file",
then you'll have to choose Unicode format using "Save as..."
option. If by "write Chinese" you mean a way to enter Chinese
character in Notepad or Wordpad, then the solution is instalation
of Chinese keyboard or using "charmap.exe" application to
select, copy and paste desired Chinese characters.
> Which mode should I use to send the file to the server?
Binary (you can use text transfer mode if you save files as UTF-8,
but not if it's UTF-16 or if you are not sure which Unicode
format was used). The more important thing is not the way
of sending files to the webserver, but the way of using them.
You have to remember to edit them using Unicode-enabled
editor and to make web server send content-type header
including file encoding information (UTF-16 or UTF-8 or UCS-2).
> What about Russian?
Same here.
You can also use codepages specific for the language (Chinese
or Russian), but Unicode is probably the best way (UTF-8 being
best if you mix languages and / or mix code - like PHP / HTML
- with text).
Hilarion
[Back to original message]
|