Jump to content
Chinese-Forums
  • Sign Up

Displaying Proper Chinese Encoding on a Webpage (html)


chairman_tap

Recommended Posts

Hi folks, I was hoping someone out there might be able to help me with a Chinese encoding questions. I'm trying to build a webpage that displays Chinese characters both gb2312 and big5. The problem I'm having though is that when I write the html page I can't get the browser to display the Chinese correctly without having to manually go into the browser and change the encoding method.

For example we are trying to display Chinese characters in gb2312 but the browser by default only displays a bunch of random jibberish (since the encoding isn't set in the browser). Only after the user goes into their browser and manually chooses the encoding method (in this case gb2312) will the Chinese characters show up correctly. I was wondering if anyone knew of any way to get the web browser to correctly display the Chinese characters without having to have the user each time select the correct encoding method in their browser. Instead writing the html in a way that tells the browser what kind on encoding to use.

Your help and input is much appreciated...look forward to hearing from you guys and gals..

Link to comment
Share on other sites

You need something like


in your header - set the charset accordingly. However, I'm not sure about displaying two different charsets - GB2312 and Big5 - on one page, and I suspect if you did manage it it would still be very dependent on browsers cooperating. UTF-8 is what I would use for that.

Link to comment
Share on other sites

Join the conversation

You can post now and select your username and password later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Click here to reply. Select text to quote.

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...