Hello all
I want to convert Chinese name in the Pinyin format in a C# web based application.
Actually I want to enable user to enter name in either in Chinese language or in english.
So if user enter his name in chinese then we will convert that Chinese name in the Pinyin format and by using that Pinyin code we want to search it in our database.
So can anybody help me...??For implementing Pinyin in my project.
For Pinyin you can refer this url...
http://en.wikipedia.org/wiki/Pinyin_table
Thanks Neha...:)
Loading
Anwar BuchooPosted Feb 21, 2006, 5:53 AM
You can encode the Chinese characters (or any other text) using:
HttpUtility.HtmlEncode(Text);
and then apply your algo. on the resulting text that will convert it into Pinyin format.
After that, you just save the resulting text into the database. Whenever you got to make a search of names in your database, you repeat the process of encoding and cross-check with the data in the DB.
NB: If it is not necessary for you to use the Pinyin format for your application, then you can change the datatype of your field into nvarchar, which accepts and save chinese characters as is into the DB.