Use C # To extract Chinese pinyin

Source: Internet
Author: User

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

 

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.