The situation is WebPage was made by GBK encoding. GBK is one of the Chinese Encoding.
When the browser loading the page, it always return UTF-8.
It should be GBK.
I checked the head of the webpage.

content=”text/html; charset=gb2312″

Different browsers tested. All failed.
How to fix this problem and let the server feedback the GBK/GB2312 code?


It is Apache server setting.
Directives of this site.
Add these two
AddDefaultCharset GBK
LanguagePriority

And also edit httpd.conf
# AddDefaultCharset UTF-8
AddDefaultCharset off

Restart Apache. Done.
If you use other coding, you can still use this method to fix the problem.

David Yin

David is a blogger, geek, web developer. Founder of FreeInOutBoard.com. He check David Yin's Blog everyday. If you like his post, you can say thank you here

Leave a Reply

Your email address will not be published. Required fields are marked *