RE: Character encoding mismatch

There are two ways to set the character encoding.  One is through
the HTTP Content-type header and the other is through an HTML
meta tag.  If you are creating a static HTML page, then you usually
choose the second method.  If you are running a script on the 
Web server (such as an ASP or JSP page), then you have opportunity
to write code that will cause the Webserver to set the HTTP Content-type
header in the response.

Evidently you are runnning some kind of script and the Content-Type
header is getting set but it is getting set to ISO-8859-1.  My guess
is that your script is JSP or Java related because Java servlets use
ISO-8859-1 as their default encoding.  If your page is a JSP page,
then you will want to add code to set a property on the response
object for GB2312.

-Paul

-----Original Message-----
From: Chris Phillips [mailto:chris@english-partner.com]
Sent: Wednesday, November 13, 2002 6:40 AM
To: www-international@w3.org
Subject: Character encoding mismatch




I have just localised a site into Chinese (GB2312)

The thing is that when I go to the site on the net my browser doesn't pick 
up that it is GB2312 and instead keeps it as (iso-8859-1). I have to 
manually change the encoding for the page to view properly. This doesn't 
happen when I view other sites with the same encoding.

When I ran a check at W3C I got the following message:

Warning: Character Encoding mismatch! The character encoding specified in 
the HTTP header (ォiso-8859-1サ) is different from the one specified in the 
META element (ォgb2312サ).

I have just create a subfolder in the web e.g 
<http://www.domain.com/chinese>www.domain.com/<http://www.domain.com/chinese 
 >chinese Is this happening because the browser is reading the encoding 
rom <http://www.domain.com>www.domain.<http://www.domain.com>com and not 
/chinese? Does /chinese have to be converted into a subweb or something?

I would be grateful if someone could shed some light for me here.

Thanks in advance.
Chris

Received on Wednesday, 13 November 2002 10:34:14 UTC