[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: can't read my hanzi files with firefox

On Sat, 27 Nov 2004 02:08:55 -0800, Jean-Michel besnard
<besnard@tekkno.net> wrote:
> Hi,
> I can read the hanzi from different chinese websites, however when I try to
> read my own files with firefox I only get weird characters.
> As an example, I have written some characters in a file called test.txt
> available at http://www.besnard.org/~besnard/test.txt

Of course, you can't read the chinese.
if you don't indicate the char encoding on your webpage via meta Content-Type
tag of HTML or Content-Type HTTP header, most browser will display the page
with default char encoding. It is ISO-8859-1 if have have change it.


> Another interesting phenomenon:
> if I download a webpage in chinese (e.g http://www.china.com/index.html) and
> then open it with gedit, then all the chinese characters look as weird as the
> above mentioned one's I get in Firefox.

china.com is using GB2312,
gedit will try to distingish which encoding the file use when it read a file.
however, GB2312 is too hard for it and it always show think it is using UTF-8
you should use "gedit --encoding=GB2312 index.html" or choose a rignt
encoding while open the file


Roy Chan (http://xychen.org/)

Reply to: