Skip to content Skip to sidebar Skip to footer

Can't Show Chinese Character For Html On Linux Server

This webpage can't show chinese character, Can I find a way to display these characters ?

Solution 1:

Your web server is most likely outputting a Content-Type HTTP header which is set to ISO-8859-1 or something else, overruling your <meta> Content-Type tag. Configure your web-server to output an HTTP header with the correct encoding and/or make sure your HTML is actually saved in UTF-8.

Solution 2:

The document displays OK when viewed locally. Something odd has happened when you have saved it in a file and uploaded to a server. It is not a simple problem of wrong encoding as @deceze suggested, since when saved in UTF-8 and interpreted as ISO-8859-1 for example, the Chinese characters appear as 星座 (six characters, since each of the Chinese characters has a three-byte representation in UTF-8).

Since you see the characters as four characters in the ISO-8859-1 range, perhaps they were actually saved in a UTF-16 encoding, then erroneously code-converted via some mapping and finally interpreted as if the resulting bytes were ISO-8859-1 encoded. Describing the process of saving and uploading the file and especially giving the URL of an uploaded document might help.

Post a Comment for "Can't Show Chinese Character For Html On Linux Server"