You are here: Re: html, unicode and character sets « HTML « IT news, forums, messages
Re: html, unicode and character sets

Posted by Benjamin Niemann on 11/23/75 11:43

jb wrote:

>> jb wrote:
>>
>>> If an html file is created in 16-bit unicode format and an appropriate
>>> character set is used (e.g. GB2312, a flavor of chinese), will it
>>> display correctly?
>>
>> When using 16-bit encoding, you must configure your webserver correctly,
>> so it sends the encoding in the Content-Type HTTP header (Content-Type:
>> text/html; coding=GB2312).

I have to correct myself. GB2312 is a variable-length encoding which is
ASCII compatible. This means that it could be sufficient in most cases to
declare the encoding as
<meta http-equiv="Content-Type" content="text/html; coding=GB2312">. This
will only work, if the HTTP header does not contain the coding parameter.
It is still *strongly* recommended to declare the encoding in the HTTP
headers.

> Will it work for local files?

With a META element with the coding parameter this should also work for
local files (which is the only reason I could think of to use <meta
http-equiv..> at all).

>>> Will it be necessary to use any character codes?
>>
>> What do you mean by 'character codes'?
>>
>
> ...codes like this: &#246;

These are called 'character entity references'. You'll have to use these
whenever you need a character which is not available in GB2312.

--
Benjamin Niemann
Email: pink at odahoda dot de
WWW: http://pink.odahoda.de/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация