Enter a Chinese character and convert it to the source program of the Chinese character Pinyin.

Source: Internet
Author: User
Article title: enter a source program for converting Chinese characters into Chinese characters. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
/*
* Source: hz. c
* Version: 1.0
* Description: convert Chinese characters to pinyin
* Interface:
*
*
* History:
* Date Postion Author Description
*------------------------------------------------------------------
* 2004.05.20 NanJing Wu Yuming Create
*/
  
# Include
# Define ROW_CNT 396
Long wu_get_asc (char * str)
{
Long l;
Char str_tmp [11];
  
Memset (str_tmp, 0, sizeof (str_tmp ));
Str_tmp [0] = str [1];
Str_tmp [1] = str [0];
L = * (long *) str_tmp;
L = l-65536;
  
/*
Printf ("% ld \ n", l );
Printf ("% d \ n", str_tmp [0]);
Printf ("% d \ n", str_tmp [1]);
*/
Return l;
}
  
Void main (int argc, char * argv [])
{
// 396 rows in total
Char * py [] =
{
"",
"Ai ",
"",
"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 ",
"Cuo ",
"Da ",
"Dai ",
"Dan ",
"Dang ",
"Dao ",
"De ",
"Deng ",
"Di ",
"Dian ",
"Diao ",
"Die ",
"Ding ",
"Diu ",
"Dong ",
"Dou ",
"Du ",
"Duan ",
"Dui ",
"Dun ",
"Duo ",
"E ",
"En ",
"Er ",
"Fa ",
"Fan ",
"Fang ",
"Fei ",
"Fen ",
"Feng ",
"Fo ",
"Fou ",
"Fu ",
"Ga ",
"Gai ",
"Gan ",
"Gang ",
"Gao ",
"Ge ",
"Gei ",
"Gen ",
"Geng ",
"Gong ",
"Gou ",
"Gu ",
"Gua ",
"Guai ",
"Guan ",
"Guang ",
"Gui ",
"Gun ",
"Guo ",
"Ha ",
"Hai ",
"Han ",
"Hang ",
"Hao ",
"He ",
"Hei ",
"Province ",
"Heng ",
"Hong ",
"Hou ",
"Hu ",
"Hua ",
"Huai ",
"Huan ",
"Huang ",
"Hui ",
"Hun ",
"Huo ",
"Ji ",
"Jia ",
"Jian ",
"Jiang ",
"Jiao ",
"Jie ",
"Jin ",
"Jing ",
"Jiong ",
"Jiu ",
"Ju ",
"Juan ",
"Jue ",
"Jun ",
"Ka ",
"Kai ",
"Kan ",
"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 ",
"Nie ",
"Nin ",
"Ning ",
"Niu ",
"Nong ",
"Nu ",
"Nv ",
"Nuan ",
"Nue ",
"Nuo ",
"O ",
"Ou ",
"Pa ",
"Pai ",
"Pan ",
"Pang ",
"Pao ",
"Pei ",
"Pen ",
"Peng ",
"Pi ",
"Pian ",
"Piao ",
"Pie ",
"Pin ",
"Ping ",
"Po ",
"Pu ",
"Qi ",
"Qia ",
"Qian ",
"Qiang ",
"Qiao ",
"Qie ",
"Qin ",
"Qing ",
"Qiong ",
"Qiu ",
"Qu ",
"Quan ",
"Que ",
"Qun ",
"Ran ",
"Rang ",
"Rao ",
"Re ",
"Ren ",
"Reng ",
"Ri ",
"Rong ",
"Rou ",
"Ru ",
"Ruan ",
"Rui ",
"Run ",
"Ruo ",
"Sa ",
"Sai ",
"San ",
"Sang ",
"Sao ",
"Se ",
"Sen ",
"Seng ",
"Sha ",
"Shai ",
"Shan ",
"Shang ",
"Shao ",
"She ",
"Shen ",
"Sheng ",
"Shi ",
"Shou ",
"Shu ",
"Shua ",
"Shuai ",
"Shuan ",
"Shuang ",
"Shui ",
"Shun ",
"Shuo ",
"Si ",
"Song ",
"Sou ",
"Su ",
"Suan ",
"Sui ",
"Sun ",
"Suo ",
"Ta ",
"Tai ",
"Tan ",
"Tang ",
"Tao ",
"Te ",
"Teng ",
"Ti ",
"Tian ",
"Tiao ",
"Tie ",
"Ting ",
"Tong ",
"Tou ",
"Tu ",
"Tuan ",
"Tui ",
"Tun ",
"Tuo ",
"Wa ",
"Wai ",
"Wan ",
"Wang ",
"Wei ",
"Wen ",
"Weng ",
"Wo ",
"Wu ",
"Xi ",
"Xia ",
"Xian ",
"Xiang ",
"Xiao ",
"Xie ",
"Xin ",
"Xing ",
"Xiong ",
"Xiu ",
"Xu ",
"Xuan ",
"Xue ",
"Xun ",
"Ya ",
"Yan ",
"Yang ",
"Yao ",
"Ye ",
"Yi ",
"Yin ",
"Ying ",
"Yo ",
"Yong ",
"You ",
"Yu ",
"Yuan ",
"Yue ",
"Yun ",
"Za ",
"Zai ",
"Zan ",
"Zang ",
"Zao ",
"Ze ",
"Zei ",
"Zen ",
"Zeng ",
"Zha ",
"Zhai ",
"Zhan ",
"Zhang ",
"Zhao ",
"Zhe ",
"Zhen ",
"Zheng ",
"Zhi ",
"Zhong ",
"Zhou ",
"Zhu ",
"Zhua ",
"Zhuai ",
"Zhuan ",
"Zhuang ",
"Zhui ",
"Zhun ",
"Zhuo ",
"Zi ",
"Zong ",
"Zou ",
"Zu ",
"Zuan ",
"Zui ",
"Zun ",
"Zuo"
};
Long py_code [] =
{
-20319,
-20317,
-20304,
-20295,
-20292,
-20283,
-20265,
-20257,
-20242,
-20230,
-20051,
-20036,
-20032,
-20026,
-20002,
-19990,
-19986,
-19982,
-19976,
-19805,
-19784,
-19775,
-19774,
-19763,
-19756,
-19751,
-19746,
-19741,
-19739,
-19728,
-19725,
-19715,
-19540,
-19531,
-19525,
-19515,
-19500, <
Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.