I have created a webpage and the content is in Chinese Simplified (GB2312) encoding. On my localhost, it displays perfectly in Firefox and IE. However, on the live webserver, it refuses to display correctly when I view it with either Firefox or IE. I will have to manually select the Character Encoding as Chinese Simplified (GB2312) then only will the chinese characters come out. Of course this line is in the page <meta http-equiv="Content-Type" content="text/html; charset=GB2312"> How come? Is there a way to force it to always use GB2312 encoding?
May we have a link? The server response header will tell us a lot, as it is more authoritative than the meta char-set. As a general rule, you should use utf-8 to save the file, and the server should specify utf-8. If the server specifies iso-8859-x as the default charset (not unusual), your characters are being interpreted as single octets. cheers, gary
Hi, That's my client's website, and the client do not like me revealing the site here... How can I check the header, and how can we force it to use utf-8? The page is done in PHP. Thanks.
I have found the solution! It's so simple. Just instruct the server to use GB2312. Use php: header('Content-Type: text/html; charset=GB2312')