Conversion of Chinese characters to Pinyin (ASP edition)

Source: Internet
Author: User
Chinese character | Pinyin many problems are caused by Chinese problems
If the filename is best not in Chinese
Now the solution is usually to generate an ID, the ID to do the file name
If the URL has Chinese characters on the page, it often goes wrong
Now the solution is generally encoded with UrlEncode

Now, with this transformation, it's much better.

Principle, using dictionary technology
1. Add index
2. Traverse Dictionary

<%
Set d = CreateObject ("Scripting.Dictionary")
D.add "A",-20319
D.add "AI",-20317
D.add "An",-20304
D.add "Ang",-20295
D.add "AO",-20292
D.add "Ba",-20283
D.add "Bai",-20265
D.add "Ban",-20257
D.add "Bang",-20242
D.add "Bao",-20230
D.add "Bei",-20051
D.add "Ben",-20036
D.add "Beng",-20032
D.add "Bi",-20026
D.add "Bian",-20002
D.add "Biao",-19990
D.add "Bie",-19986
D.add "Bin",-19982
D.add "Bing",-19976
D.add "Bo",-19805
D.add "Bu",-19784
D.add "Ca",-19775
D.add "Cai",-19774
D.add "Can",-19763
D.add "Cang",-19756
D.add "Cao",-19751
D.add "Ce",-19746
D.add "CEng",-19741
D.add "Cha",-19739
D.add "Chai",-19728
D.add "Chan",-19725
D.add "Chang",-19715
D.add "Chao",-19540
D.add "Che",-19531
D.add "Chen",-19525
D.add "Cheng",-19515
D.add "Chi",-19500
D.add "Chong",-19484
D.add "Chou",-19479
D.add "Chu",-19467
D.add "Chuai",-19289
D.add "Chuan",-19288
D.add "Chuang",-19281
D.add "Chui",-19275
D.add "Chun",-19270
D.add "Chuo",-19263
D.add "CI",-19261
D.add "Cong",-19249
D.add "Cou",-19243
D.add "CU",-19242
D.add "Cuan",-19238
D.add "Cui",-19235
D.add "Cun",-19227
D.add "CuO",-19224
D.add "Da",-19218
D.add "Dai",-19212
D.add "Dan",-19038
D.add "Dang",-19023
D.add "DAO",-19018
D.add "de",-19006
D.add "Deng",-19003
D.add "Di",-18996
D.add "Dian",-18977
D.add "Diao",-18961
D.add "Die",-18952
D.add "Ding",-18783
D.add "Diu",-18774
D.add "Dong",-18773
D.add "Dou",-18763
D.add "Du",-18756
D.add "Duan",-18741
D.add "DUI",-18735
D.add "Dun",-18731
D.add "Duo",-18722
D.add "E",-18710
D.add "en",-18697
D.add "ER",-18696
D.add "FA",-18526
D.add "Fan",-18518
D.add "Fang",-18501
D.add "Fei",-18490
D.add "Fen",-18478
D.add "Feng",-18463
D.add "fo",-18448
D.add "Fou",-18447
D.add "Fu",-18446
D.add "GA",-18239
D.add "Gai",-18237
D.add "Gan",-18231
D.add "Gang",-18220
D.add "Gao",-18211
D.add "GE",-18201
D.add "GEi",-18184
D.add "Gen",-18183
D.add "Geng",-18181
D.add "Gong",-18012
D.add "Gou",-17997
D.add "gu",-17988
D.add "Gua",-17970
D.add "Guai",-17964
D.add "Guan",-17961
D.add "Guang",-17950
D.add "GUI",-17947
D.add "Gun",-17931
D.add "Guo",-17928
D.add "Ha",-17922
D.add "Hai",-17759
D.add "Han",-17752
D.add "Hang",-17733
D.add "Hao",-17730
D.add "he",-17721
D.add "Hei",-17703
D.add "Hen",-17701
D.add "Heng",-17697
D.add ","-17692
D.add "Hou",-17683
D.add "Hu",-17676
D.add "Hua",-17496
D.add "Huai",-17487
D.add "Huan",-17482
D.add "Huang",-17468
D.add "Hui",-17454
D.add "Hun",-17433
D.add "Huo",-17427
D.add "Ji",-17417
D.add "Jia",-17202
D.add "Jian",-17185
D.add "Jiang",-16983
D.add "Jiao",-16970
D.a



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.