| kang | kao | ke | ken | keng | kong | kou | ku | kua | kuai | kuan | kuang "."| Kui | kun | kuo | la | lai | lan | lang | lao | le | lei | leng | li | lia | lian | liang | liao | lie | lin | ling | liu | long | lou | lu | lv | luan | lue "."| Lun | luo | ma | mai | man | mang | mao | me | mei | men | meng | mi | mian | miao | mie | min | ming | miu | mo | mou | mu | na | nai | nan | nang | nao | ne "."| Nei | nen | neng | ni | nian | niang | niao |
children release milk giant private yin Yi Jing tan tired Yun Mo dulle Bending Performance recruit Shao Hu call pain peak 0 Chai spring Wu jump Ju Shang Ding Qin slightly chasing Liang discount alkali shugang dig blade drama hehe chest heng Qin film published in the case of slow and convex active cut Sichuan snow chain Yu la face households Luo shu Bo Meng buy Yang zongjiao saqi filter silicon carbon shares sitting Steam Condensate actually trapped gun Li rescue hidden Holes criminal tube you s
The problem of Chinese characters to pinyin
Find such a class on the Internet, but some Chinese characters can not be converted to pinyin. Don't know if it has anything to do with IME? For example: Vernon, the output is empty.
function Pinyin ($_string,$_code= ' gb2312 '){$_datakey = "A|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao |ce|ceng|cha "."|chai|chan|chang|chao|che|chen|cheng|chi|chong|chou|chu|chuai|chuan|chuang|chui|chun|chuo|ci|c
1 " "2 writing to an Excel file using the Xlrd module3 " "4 Importxlrd5Book=xlrd.open_workbook (R'/users/c2apple/desktop/Record/test report/Zhang Tao file tray/Hong Hongwen template/Color ribbon elevation/zd-qr-730114 Color test report version 00. xlsx')#Open Excel File6Sheet1=book.sheet_by_name (' First')#Open Worksheet7Row0=sheet1.row (0)#Get line No. 08 Print(row0[0])9 Print(Row0[0].value)#View the contents of a cellTen One #reading Excel2007 and
Most similar code on the network can only be used under gb2312 encoding, and the following class can convert Chinese characters to pinyin under Utf-8 encoding.
The specific code and usage are as follows:
Copy Code code as follows:
function Pinyin ($_string, $_code= ' gb2312 ')
{
$_datakey = "A|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben|beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao |ce|ceng|cha ".
"|chai|chan|chang|chao|che|chen|cheng|chi|chong|chou|chu|chuai|chuan|chuang|
select ' Ku ', N ' 嚳 '
UNION ALL SELECT ' Kua ', N ' hip '
UNION ALL SELECT ' Kuai ', N ' 鱠 '
UNION ALL select ' Kuan ', N ' 窾 '
UNION ALL SELECT ' Kuang ', N ' 鑛 '
UNION ALL SELECT ' Kui ', N ' 鑎 '
UNION ALL select ' Kun ', N ' 睏 '
UNION ALL select ' Kuo ', N ' 穒 '
UNION ALL select ' La ', N ' 鞡 '
UNION ALL select ' Lai ', N ' 籟 '
UNION ALL SELECT ' LAN ', N ' 糷 '
UNION ALL select ' Lang ', N ' 唥 '
UNION ALL select ' Lao ', N ' 軂 '
UNIO
Recently to develop the conversion of Chinese characters to pinyin and to get the function of the first word record down Hazi: hehe ~
Class pinyin{Private $_outencoding = "GB2312"; Public Function Getpinyin ($str, $pix = ', $code = ' gb2312 ') {$_datakey = ' a|ai|an|ang|ao|ba|bai|ban|bang|bao|bei|ben| Beng|bi|bian|biao|bie|bin|bing|bo|bu|ca|cai|can|cang|cao|ce|ceng|cha ". "|chai|chan|chang|chao|che|chen|cheng|chi|chong|chou|chu|chuai|chuan|chuang|chui|chun|chuo|ci|cong|cou|cu|". "Cuan|cui|cun|
Celebrities in various database fields:Oracle DB is currently hot, the field of celebrities quite a lot, eel with, withered flourish Elder, old cover, Lao Yang (Ting Kun), Cherish the Total (Oracle original), Bill.lee Master (Oracle original), the bank has no deposit, dream, no Total (Hang) and so on.IBM DB2 celebrities have Bull Xzs, Wang Tao, Zhang Dongju (Fortis Orient), Wang Feipeng (original IBM), Wang
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.