I am currently trying to do a website with both chinese and englis text, and I have problems displaying chinese text. I uploaded a set of identical website files to 2 different servers and domains, and one displays chinese character but has messed up layout, the other does not display the chinese character (instead it's all ?????) but the layout is ok.

The website is all in PHP and uses include() generate each part of a web page. The PHP files are ANSI for those where there is no chinese, and UTF where there is.

I am wondering if the file encoding affects the HTML output. For example, it might be the case that it generate different parts of the file in differet encoding such that there is no uniform encoding?

Any idea if this is the case or what else can it be?


Recommended Answers

All 2 Replies


This code in HTML affect the encoding

<META http-equiv="Content-Type" content="text/html; charset=gb2312">

The charset in this example is for Chinese website.

Thanks it20219 for the response.

I had solve the language problem and I forgot to update this post with the solution, which is to use "UTF 8 without BOM" instead of just "UTF 8".

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.