Home  >  Article  >  Backend Development  >  Talking about Chinese character conversion types and solutions_PHP tutorial

Talking about Chinese character conversion types and solutions_PHP tutorial

WBOY
WBOYOriginal
2016-07-20 11:04:181014browse

●There are four cases of Simplified and Traditional conversion
Chinese character conversion is divided into internal code conversion and Simplified and Traditional conversion.
Internal code conversion is a conversion between Simplified and Traditional Chinese, but it mainly converts between GB code and BIG5 code.
Another kind of conversion between Simplified and Traditional Chinese is the conversion within the GB code. The GB code extension set contains more than 20,000 Chinese characters, and naturally there is also the problem of conversion from Simplified to Traditional Chinese. For example, although mainland netizens use the "copy-paste" method from a BIG5 Traditional Chinese web page to get a Traditional Chinese file, it is no longer a BIG5 font. Although the internal code of the page is BIG5 code, after copying and pasting, it has become the traditional Chinese character of GB internal code. When pasted into the "notebook", it is not garbled. You must know that notebooks with mainland simplified Windows systems cannot recognize BIG5. Coded. If you want to convert these traditional Chinese characters into simplified Chinese characters, you won't be able to use ordinary methods.
Therefore, don’t think that traditional Chinese characters are all BIG5 codes. Therefore, Chinese character conversion is divided into four situations:
 1. GB to BIG5
 2. BIG5 to GB
 3. Convert simplified characters to traditional Chinese characters (converted in GBK mainland code)
 4. Convert Traditional Chinese characters to Simplified Chinese characters (same as above)
● Conversion feature of web page "Save As". Use "Save As" on the web page to convert Chinese character internal codes.
When we save a BIG5 webpage using the "Save As" method, please note that there is an "Encoding" column at the bottom of the "Save WEB Page" window, with at least three options: Unicode (UTF- 8), Traditional Chinese (BIG5), Simplified Chinese (GB2312).
The internal code of this webpage is Unicode (UTF-8), so it can display GB code and BIG5 code Chinese characters at the same time. If you choose a different internal code to save, the internal code conversion has already been performed. Taking advantage of this feature, we can use the web page "Save As" to convert Chinese character internal codes.
●Online Chinese character conversion, mostly internal code conversion. If you want to convert the copied traditional Chinese characters in GB code into simplified characters with the same internal code, or vice versa, the online conversion function is obviously insufficient.
●"Kingsoft Quick Translation" contains two files: KConvert.exe and Cjktab32.dll. The total size is only 484K, and after being compressed into a RAR file, it is only 235K. It can be extracted directly and used alone. He can perform any conversion of the above four Chinese characters.
I have uploaded these two files from Kingsoft Express, and netizens who want to use them can download them.
Internal code conversion of Kingsoft Quick Translation (available for decompression, no installation required)
■http://202.202.4.200/upload/upfile/gb-big5.rar■
●Manual modification of individual words
However, most Chinese character conversion software has a small problem. When automatically converting from Simplified to Traditional Chinese, there is a problem with the conversion of certain characters (a one-to-many problem). The surname Fan will be converted into the pattern

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445204.htmlTechArticle●There are four situations of Chinese character conversion, which are divided into internal code conversion and simplified and traditional conversion. Internal code conversion is a conversion between Simplified and Traditional Chinese, but it mainly converts between GB code and BIG5 code. Also...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn