This article mainly introduces the methods for converting php Traditional Chinese and simplified Chinese. It involves the use of the array simplified and Traditional Chinese comparison tables in php and has some reference value. For more information, see
This article mainly introduces the methods for converting php Traditional Chinese and simplified Chinese. It involves the use of the array simplified and Traditional Chinese comparison tables in php and has some reference value. For more information, see
This document describes how to convert php Traditional Chinese and simplified Chinese. Share it with you for your reference. The specific analysis is as follows:
The following code uses the traditional Chinese and simplified Chinese character libraries to convert traditional Chinese and simplified Chinese characters.
The Code is as follows:
<? Php
Class utf8_chinese
{
Private $ utf8_gb2312;
Private $ utf8_big5;
Private $ data;
Public function _ construct ($ data ){
$ This-> utf8_gb2312 = $ data ['sim '];
$ This-> utf8_big5 = $ data ['tra '];
}
Public function gb2312_big5 ($ str ){
$ Str_t = '';
$ Len = strlen ($ str );
$ A = 0;
While ($ a <$ len ){
If (ord ($ str {$ a}) >=224 & ord ($ str {$ a}) <= 239 ){
If ($ temp = strpos ($ this-> utf8_gb2312, $ str {$ }. $ str {$ a + 1 }. $ str {$ a + 2 }))! = False ){
$ Str_t. = $ this-> utf8_big5 {$ temp}. $ this-> utf8_big5 {$ temp + 1}. $ this-> utf8_big5 {$ temp + 2 };
$ A + = 3;
Continue;
}
}
$ Str_t. = $ str {$ };
$ A + = 1;
}
Return $ str_t;
}
Public function big5_gb2312 ($ str ){
$ Str_t = '';
$ Len = strlen ($ str );
$ A = 0;
While ($ a <$ len ){
If (ord ($ str {$ a}) >=224 & ord ($ str {$ a}) <= 239 ){
If ($ temp = strpos ($ this-> utf8_big5, $ str {$ }. $ str {$ a + 1 }. $ str {$ a + 2 }))! = False ){
$ Str_t. = $ this-> utf8_gb2312 {$ temp}. $ this-> utf8_gb2312 {$ temp + 1}. $ this-> utf8_gb2312 {$ temp + 2 };
$ A + = 3;
Continue;
}
}
$ Str_t. = $ str {$ };
$ A + = 1;
}
Return $ str_t;
}
}
$ _ UTF8_TRA = array (
'Sim '=> 'wan and the ugly professional Cong Dong Si lost two strict funeral tickets. Fengfeng is standing for liju? Yiwu leqiao Xi township book purchase chaos in the loss of cloud imaya production Mu qinxi only from the Lun warehouse, the high-price crowd will attack the umbrella Wei Chuan and hurt the Lun Peng pseudo queue, the rest of the Commission, the Xia, the investigation side, the overseas Chinese friends, and the two lihu debts qingxiao Yu Chu Yu Er Yu dang LAN Guan xingz animal maintenance gang book write junnong Zun Feng Zheng Jing Leng Ling together a few Phoenix with Kai hit liu zhengchuang, Liu zhengchuang, delete, do not, please, try, please wei is still busy in the office of the factory, and he is tired of being overwhelmed by the pressure of the kitchen, the city vomit, please refer to the following: when the hacker sprayed himself, he grayed out and yelled at him. When the Communist Youth League Park was around, the guomu Yuanyuan Holy Land farm was closed, and the blocks were broken, and the dam and dock graves fell onto the ridge, and the land was under the same kind of chalk. pad your hair and paste your hair in the upper-right corner of the wall and the upper-right shell pot. lou ya, Jiao Yu, Yu, Yu Ying, Yu, Yu, Miao, Sun xuexiao, Ning Bao, Shi Chong, Xian Gong, Kuan bin, sleeping on searching for and directing the dead layer-7 senior member of the yiyu township-old Qigang Shaoyi landao Ling yuexiao qingtongtongtongxia qingting zhuyun yunqi the teacher's tent curtain was taken with frames to help the teacher prepare the power of the Lord and the wide village qinglu library should be under the temple Pang waste when the different Zhang mi bending and playing strong when the recording Yan Che the diameter of Yu Yi Yu worried about the state of the yellow, yellow I am so angry that I would like to block myself from being lazy, busy, and busy. unscrew and choose to throw, and throw, throw, and throw. shake your hands, shake your hands, shake your hands, gather your enemies, and compress your data into your ears. When you break the old days, you will see the sun, Xiao, dizzy, and Hui. right bar to Yang Xiaojie extremely structure Shu Zao Shu Yu gun Feng Xiao cabinet comment Comment comment gate standard stack comment wide range of oak column tree Habitat sample when the radial foot Gear qiao Hua Yu paddling pile dream ghost detection zookeeper loudid zookeeper horizontal Sakura published cupboard zookeeper Huan Yu ou J Yi residual when the hub is destroyed, the gas Hydrogen and argon in the air are broken down. ze Jing Jie sprinkling wa shile slurry pouring zookeeper turbidity test zookeeper thick zookeeper tu yongtao tailuo zookeeper vortex tailuo polyester runjian up the lake Yuanyuan Tai the water in wenyou Bay is full of water, water the disaster-stricken cancan furnace stew Wei Yi points refining and rotten hydrocarbon candle smoke annoying burn ye stew hot ashes hot Huan HUan yi ye xiao, Xiao, Xiao Shi, Xiao Yu, Xiao Ma, Wei Huan, xiao xi, Xiao Yu xuanjicang luocheng electric painting Changyi domain medicine malaria selection sore crazy blister Yellow yundun salt monitoring and anti-theft plate yundun lu Chan from the bald stalk kind of product said Lu Yi yi tax stability poor stealing Yao Wei Dou Yan vertical competing lettuce the pen was written in a cage, and the screen was sifted. The Zheng was signed and signed in a simplified manner. about the grade of yarn Yun when the students were tied by the velvet knot, the hacker was painted to the hacker, and the system was twisted, and the silk was embroidered. rope dimension cotton silk all the information in the middle of the market is always around, and all the information in the middle of the market is reduced. shame and shame, deaf job, union, Cong Su, intestinal skin, kidney swelling, threat, gallbladder, shengyu, titanium gum, vein, dirty umbilical, brain, pus, feet, removal of sputum, face, marinate, and palate yi Teng Yu Ship Cabin Yan Yi festival Wu Lu Yi yi si Cang su Yun Ping Jing ling Xiaodong Rong Yu Ying Yu lu Ying Xiao Sa Ling Yu Jiang Yu ranjus yundun body wax flies and moles fill in the title of a pair of tops, yellow you can see your questions and suggestions, and you can see your tips and suggestions. on legal proceedings: An Investigation of evidence, explanation, and evaluation of evidence, fraud, litigation, and diagnosis of fraud please refer to the following link for more information: Please refer to the following statements for further guidance: seeking for a lie and a cool voice means that the hacker can understand the riddle of the hacker, the hacker, and the hacker. yu Gu Yu bei Zhen negative Gong financial responsibility Xian defeat account goods quality vendors greedy poor purchase store through two cheap Xiao posted expensive loan and trade fee he Yu thieves Jia Bribery I was lucky enough to pay gambling prizes, and I was lucky enough to pay for it. fan Yue's rolling-Rolling I think it's easy to add a pair of workers to the roll rim of a pair of workers. the migration of liaodas to the migration is still far away. Even the late tracking is suitable for the selection of poor delivery and the legacy of Deng XiaoYu's mailbox and the adjacent Yu Xiaoyu Zheng weiyu's zookeeper and Zookeeper's soy sauce. zookeeper Shiri shixiao xiaojian (RU, R, R, O, T, O, O, T, O tungsten-hook-and-wire-hook-and-trigger-RH, er, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 the ingot key saw manganese oxide was used as a cutting-edge tool. zookeeper and zookeeper. during the peak hours, the congestion threshold was reached. team yang yin stage Lu Yu Chen Yu Shaanxi Province insurance with hidden Li Yan difficult young Xiao Wu Yan Jing Wei Ren Yi Han Yu Tao on the top of the Yun page, the top of the line is to be followed by a stubborn Gu Dun, and the top of the line is to receive a wide range of pre-skull neck, cheek, and Chin Yi frequency. the amount of apsaradb for hybriddb for MySQL. full-fed wonton bait ra drive your horse and drive your horse. cool zookeeper hip and five zookeeper salmon gizzard inspecies and inspecies inspector when the birds of the rooster have been running, the birds of the rooster have been running. there are a huge number of birds in the house. zhi's consulting team fan song didn't try it and won't be idle ',
'Tra '=> 'between Alibaba Cloud and Alibaba Cloud, there are two major reasons why Alibaba Cloud is making sense. Please try again later. the Asian production industry has announced that Alibaba Cloud's leading Leading Group members have been using Alibaba Cloud products to improve their performance. please refer to the following link for more information: please refer to the following documents for more information: there is a huge amount of traffic in our region. There are just a few large numbers of small numbers of bytes of data. after the change, why does the website fail to be updated? Have you heard that the website administrator has been notified? there have been several large numbers of small numbers of Chinese there is a huge amount of pressure on the market. in addition, the number of concurrent users in the website has reached a certain number of Chinese characters. I have been reading this article for some time. please refer to the following link for more information: please refer to the following link for more information: I would like to announce that my website has been released soon. during the battle, there will be two major challenges: please refer to the following link for more information: when there is no such change, there will be a number of unauthorized users who have been authorized to access the website. please refer to the following link for more information: please refer to the following link for more information: there has been a number of attacks in the market. There has been no improvement in the market. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please try again later. Please try again later. there have been many problems in the power supply industry. please refer to the following link for more information: please refer to the following link for more information: there are two major causes for this problem: please refer to the following table for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following documents for more information: I think it is highly recommended that our customers have already been connected to Alibaba Cloud, and our customers will be highly aware of this problem. I may comment on the legal representative's certificate provided by the legal representative of the legal representative. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: Why? alibaba Cloud's website is based on Alibaba Cloud's website. there will be a number of large numbers of small numbers of vehicles. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there are two major reasons for this problem: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: there are two major issues in this regard: Why? please refer to the following link for more information: there have been several attempts to improve the performance of these products. please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please refer to the following link for more information: please wait until there are too many attempts when there are too many attempts ',
);
Function cns ($ str ){
Global $ _ UTF8_TRA;
$ Chinese = new utf8_chinese ($ _ UTF8_TRA );
$ Str_big5 = $ chinese-> gb2312_big5 ($ str );
Return $ str_big5;
}
I hope this article will help you with php programming.