Jump to content

Character Encoding?


random1

Recommended Posts

I have recently read about UTF-8 page encoding: http://htmlpurifier.org/docs/enduser-utf8.html

 

I have made the switch following it's instructions.

 

I have the chinese text example 1: 激光, 這兩個字是甚麼意思

 

and chinese text example 2: 激光, 這兩個字是甚麼意思

 

How do I get the text text from example 1 to be automatically transformed into 2 using PHP? Is UTF-8 the best?

Link to comment
https://forums.phpfreaks.com/topic/95208-character-encoding/
Share on other sites

Actually if you are making asian language websites, utf-8 encoding is not recommended at all. PHP does not collate the characters properly, and as a result searching and the like can be unreliable. If the goal is just to be able to display asian characters, then utf-8 will work, but if the site is to be an asian language site, then EUC-CN encoding should be used for chinese and EUC-JP for Japanese. These should be used as the internal PHP programming charset, and the database should also be set to this encoding. The output language should be Shift-JIS for Japanese, although I am not 100% sure what it should be for Chinese. I think either Big5 or just stick with EUC-CN.

Link to comment
https://forums.phpfreaks.com/topic/95208-character-encoding/#findComment-489263
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.