There are many algorithms for ASP and PHP to use Chinese pinyin, but these algorithms are not very effective in C # Because in ASP, PHP, Delphi, and other languages, they represent characters in the "ANSI" way, that is, the program stores the inner code of Chinese characters, and all characters in C # Are Unicode, not Chinese characters inner code, therefore, the simple application of PHP and ASP to obtain Chinese Pinyin is ineffective. I wrote a component that uses C # To obtain Chinese pinyin for free in the program.
Component name: Saf. encoding. dll (SAF: sinoprise Application Framework)
Usage:
Using Saf. Encoding;
......
Pinyin:
Textbox2.text = pinyin. getpinyin (textbox1.text );
Or
Textbox2.text = pinyin. getpinyin (textbox1.text ,"");
Simple search:
Textbox2.text = pinyin. getjianpin (textbox1.text );
Or
Textbox2.text = pinyin. getjianpin (textbox1.text ,"");
This component only supports the gb2312 character set.
: Http://sinoprise.com/read.php? Tid = 1450 & page = 1 & toread = 1
Sinoprise Technology Lab
Yin Shuguang
2006-0