ToPinyin.asp
上传用户:jiajie98
上传日期:2020-04-24
资源大小:1206k
文件大小:12k
源码类别:

网格计算

开发平台:

PHP

  1. <%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
  2. <%
  3. Session.CodePage=936
  4. Response.ContentType = "text/html"
  5. Response.Charset = "GB2312"
  6. Response.Expires=-999
  7. Session.Timeout=999
  8. '==========================================
  9. '文 件 名:ToPinyin.asp
  10. '文件用途:转换为拼音
  11. '==========================================
  12. Set Pinyin=CreateObject("Scripting.Dictionary") 
  13. Pinyin.add "A",-20319 
  14. Pinyin.add "Ai",-20317 
  15. Pinyin.add "An",-20304 
  16. Pinyin.add "Ang",-20295 
  17. Pinyin.add "Ao",-20292 
  18. Pinyin.add "Ba",-20283 
  19. Pinyin.add "Bai",-20265 
  20. Pinyin.add "Ban",-20257 
  21. Pinyin.add "Bang",-20242 
  22. Pinyin.add "Bao",-20230 
  23. Pinyin.add "Bei",-20051 
  24. Pinyin.add "Ben",-20036 
  25. Pinyin.add "Beng",-20032 
  26. Pinyin.add "Bi",-20026 
  27. Pinyin.add "Bian",-20002 
  28. Pinyin.add "Biao",-19990 
  29. Pinyin.add "Bie",-19986 
  30. Pinyin.add "Bin",-19982 
  31. Pinyin.add "Bing",-19976 
  32. Pinyin.add "Bo",-19805 
  33. Pinyin.add "Bu",-19784 
  34. Pinyin.add "Ca",-19775 
  35. Pinyin.add "Cai",-19774 
  36. Pinyin.add "Can",-19763 
  37. Pinyin.add "Cang",-19756 
  38. Pinyin.add "Cao",-19751 
  39. Pinyin.add "Ce",-19746 
  40. Pinyin.add "Ceng",-19741 
  41. Pinyin.add "Cha",-19739 
  42. Pinyin.add "Chai",-19728 
  43. Pinyin.add "Chan",-19725 
  44. Pinyin.add "Chang",-19715 
  45. Pinyin.add "Chao",-19540 
  46. Pinyin.add "Che",-19531 
  47. Pinyin.add "Chen",-19525 
  48. Pinyin.add "Cheng",-19515 
  49. Pinyin.add "Chi",-19500 
  50. Pinyin.add "Chong",-19484 
  51. Pinyin.add "Chou",-19479 
  52. Pinyin.add "Chu",-19467 
  53. Pinyin.add "Chuai",-19289 
  54. Pinyin.add "Chuan",-19288 
  55. Pinyin.add "Chuang",-19281 
  56. Pinyin.add "Chui",-19275 
  57. Pinyin.add "Chun",-19270 
  58. Pinyin.add "Chuo",-19263 
  59. Pinyin.add "Ci",-19261 
  60. Pinyin.add "Cong",-19249 
  61. Pinyin.add "Cou",-19243 
  62. Pinyin.add "Cu",-19242 
  63. Pinyin.add "Cuan",-19238 
  64. Pinyin.add "Cui",-19235 
  65. Pinyin.add "Cun",-19227 
  66. Pinyin.add "Cuo",-19224 
  67. Pinyin.add "Da",-19218 
  68. Pinyin.add "Dai",-19212 
  69. Pinyin.add "Dan",-19038 
  70. Pinyin.add "Dang",-19023 
  71. Pinyin.add "Dao",-19018 
  72. Pinyin.add "De",-19006 
  73. Pinyin.add "Deng",-19003 
  74. Pinyin.add "Di",-18996 
  75. Pinyin.add "Dian",-18977 
  76. Pinyin.add "Diao",-18961 
  77. Pinyin.add "Die",-18952 
  78. Pinyin.add "Ding",-18783 
  79. Pinyin.add "Diu",-18774 
  80. Pinyin.add "Dong",-18773 
  81. Pinyin.add "Dou",-18763 
  82. Pinyin.add "Du",-18756 
  83. Pinyin.add "Duan",-18741 
  84. Pinyin.add "Dui",-18735 
  85. Pinyin.add "Dun",-18731 
  86. Pinyin.add "Duo",-18722 
  87. Pinyin.add "E",-18710 
  88. Pinyin.add "En",-18697 
  89. Pinyin.add "Er",-18696 
  90. Pinyin.add "Fa",-18526 
  91. Pinyin.add "Fan",-18518 
  92. Pinyin.add "Fang",-18501 
  93. Pinyin.add "Fei",-18490 
  94. Pinyin.add "Fen",-18478 
  95. Pinyin.add "Feng",-18463 
  96. Pinyin.add "Fo",-18448 
  97. Pinyin.add "Fou",-18447 
  98. Pinyin.add "Fu",-18446 
  99. Pinyin.add "Ga",-18239 
  100. Pinyin.add "Gai",-18237 
  101. Pinyin.add "Gan",-18231 
  102. Pinyin.add "Gang",-18220 
  103. Pinyin.add "Gao",-18211 
  104. Pinyin.add "Ge",-18201 
  105. Pinyin.add "Gei",-18184 
  106. Pinyin.add "Gen",-18183 
  107. Pinyin.add "Geng",-18181 
  108. Pinyin.add "Gong",-18012 
  109. Pinyin.add "Gou",-17997 
  110. Pinyin.add "Gu",-17988 
  111. Pinyin.add "Gua",-17970 
  112. Pinyin.add "Guai",-17964 
  113. Pinyin.add "Guan",-17961 
  114. Pinyin.add "Guang",-17950 
  115. Pinyin.add "Gui",-17947 
  116. Pinyin.add "Gun",-17931 
  117. Pinyin.add "Guo",-17928 
  118. Pinyin.add "Ha",-17922 
  119. Pinyin.add "Hai",-17759 
  120. Pinyin.add "Han",-17752 
  121. Pinyin.add "Hang",-17733 
  122. Pinyin.add "Hao",-17730 
  123. Pinyin.add "He",-17721 
  124. Pinyin.add "Hei",-17703 
  125. Pinyin.add "Hen",-17701 
  126. Pinyin.add "Heng",-17697 
  127. Pinyin.add "Hong",-17692 
  128. Pinyin.add "Hou",-17683 
  129. Pinyin.add "Hu",-17676 
  130. Pinyin.add "Hua",-17496 
  131. Pinyin.add "Huai",-17487 
  132. Pinyin.add "Huan",-17482 
  133. Pinyin.add "Huang",-17468 
  134. Pinyin.add "Hui",-17454 
  135. Pinyin.add "Hun",-17433 
  136. Pinyin.add "Huo",-17427 
  137. Pinyin.add "Ji",-17417 
  138. Pinyin.add "Jia",-17202 
  139. Pinyin.add "Jian",-17185 
  140. Pinyin.add "Jiang",-16983 
  141. Pinyin.add "Jiao",-16970 
  142. Pinyin.add "Jie",-16942 
  143. Pinyin.add "Jin",-16915 
  144. Pinyin.add "Jing",-16733 
  145. Pinyin.add "Jiong",-16708 
  146. Pinyin.add "Jiu",-16706 
  147. Pinyin.add "Ju",-16689 
  148. Pinyin.add "Juan",-16664 
  149. Pinyin.add "Jue",-16657 
  150. Pinyin.add "Jun",-16647 
  151. Pinyin.add "Ka",-16474 
  152. Pinyin.add "Kai",-16470 
  153. Pinyin.add "Kan",-16465 
  154. Pinyin.add "Kang",-16459 
  155. Pinyin.add "Kao",-16452 
  156. Pinyin.add "Ke",-16448 
  157. Pinyin.add "Ken",-16433 
  158. Pinyin.add "Keng",-16429 
  159. Pinyin.add "Kong",-16427 
  160. Pinyin.add "Kou",-16423 
  161. Pinyin.add "Ku",-16419 
  162. Pinyin.add "Kua",-16412 
  163. Pinyin.add "Kuai",-16407 
  164. Pinyin.add "Kuan",-16403 
  165. Pinyin.add "Kuang",-16401 
  166. Pinyin.add "Kui",-16393 
  167. Pinyin.add "Kun",-16220 
  168. Pinyin.add "Kuo",-16216 
  169. Pinyin.add "La",-16212 
  170. Pinyin.add "Lai",-16205 
  171. Pinyin.add "Lan",-16202 
  172. Pinyin.add "Lang",-16187 
  173. Pinyin.add "Lao",-16180 
  174. Pinyin.add "Le",-16171 
  175. Pinyin.add "Lei",-16169 
  176. Pinyin.add "Leng",-16158 
  177. Pinyin.add "Li",-16155 
  178. Pinyin.add "Lia",-15959 
  179. Pinyin.add "Lian",-15958 
  180. Pinyin.add "Liang",-15944 
  181. Pinyin.add "Liao",-15933 
  182. Pinyin.add "Lie",-15920 
  183. Pinyin.add "Lin",-15915 
  184. Pinyin.add "Ling",-15903 
  185. Pinyin.add "Liu",-15889 
  186. Pinyin.add "Long",-15878 
  187. Pinyin.add "Lou",-15707 
  188. Pinyin.add "Lu",-15701 
  189. Pinyin.add "Lv",-15681 
  190. Pinyin.add "Luan",-15667 
  191. Pinyin.add "Lue",-15661 
  192. Pinyin.add "Lun",-15659 
  193. Pinyin.add "Luo",-15652 
  194. Pinyin.add "Ma",-15640 
  195. Pinyin.add "Mai",-15631 
  196. Pinyin.add "Man",-15625 
  197. Pinyin.add "Mang",-15454 
  198. Pinyin.add "Mao",-15448 
  199. Pinyin.add "Me",-15436 
  200. Pinyin.add "Mei",-15435 
  201. Pinyin.add "Men",-15419 
  202. Pinyin.add "Meng",-15416 
  203. Pinyin.add "Mi",-15408 
  204. Pinyin.add "Mian",-15394 
  205. Pinyin.add "Miao",-15385 
  206. Pinyin.add "Mie",-15377 
  207. Pinyin.add "Min",-15375 
  208. Pinyin.add "Ming",-15369 
  209. Pinyin.add "Miu",-15363 
  210. Pinyin.add "Mo",-15362 
  211. Pinyin.add "Mou",-15183 
  212. Pinyin.add "Mu",-15180 
  213. Pinyin.add "Na",-15165 
  214. Pinyin.add "Nai",-15158 
  215. Pinyin.add "Nan",-15153 
  216. Pinyin.add "Nang",-15150 
  217. Pinyin.add "Nao",-15149 
  218. Pinyin.add "Ne",-15144 
  219. Pinyin.add "Nei",-15143 
  220. Pinyin.add "Nen",-15141 
  221. Pinyin.add "Neng",-15140 
  222. Pinyin.add "Ni",-15139 
  223. Pinyin.add "Nian",-15128 
  224. Pinyin.add "Niang",-15121 
  225. Pinyin.add "Niao",-15119 
  226. Pinyin.add "Nie",-15117 
  227. Pinyin.add "Nin",-15110 
  228. Pinyin.add "Ning",-15109 
  229. Pinyin.add "Niu",-14941 
  230. Pinyin.add "Nong",-14937 
  231. Pinyin.add "Nu",-14933 
  232. Pinyin.add "Nv",-14930 
  233. Pinyin.add "Nuan",-14929 
  234. Pinyin.add "Nue",-14928 
  235. Pinyin.add "Nuo",-14926 
  236. Pinyin.add "O",-14922 
  237. Pinyin.add "Ou",-14921 
  238. Pinyin.add "Pa",-14914 
  239. Pinyin.add "Pai",-14908 
  240. Pinyin.add "Pan",-14902 
  241. Pinyin.add "Pang",-14894 
  242. Pinyin.add "Pao",-14889 
  243. Pinyin.add "Pei",-14882 
  244. Pinyin.add "Pen",-14873 
  245. Pinyin.add "Peng",-14871 
  246. Pinyin.add "Pi",-14857 
  247. Pinyin.add "Pian",-14678 
  248. Pinyin.add "Piao",-14674 
  249. Pinyin.add "Pie",-14670 
  250. Pinyin.add "Pin",-14668 
  251. Pinyin.add "Ping",-14663 
  252. Pinyin.add "Po",-14654 
  253. Pinyin.add "Pu",-14645 
  254. Pinyin.add "Qi",-14630 
  255. Pinyin.add "Qia",-14594 
  256. Pinyin.add "Qian",-14429 
  257. Pinyin.add "Qiang",-14407 
  258. Pinyin.add "Qiao",-14399 
  259. Pinyin.add "Qie",-14384 
  260. Pinyin.add "Qin",-14379 
  261. Pinyin.add "Qing",-14368 
  262. Pinyin.add "Qiong",-14355 
  263. Pinyin.add "Qiu",-14353 
  264. Pinyin.add "Qu",-14345 
  265. Pinyin.add "Quan",-14170 
  266. Pinyin.add "Que",-14159 
  267. Pinyin.add "Qun",-14151 
  268. Pinyin.add "Ran",-14149 
  269. Pinyin.add "Rang",-14145 
  270. Pinyin.add "Rao",-14140 
  271. Pinyin.add "Re",-14137 
  272. Pinyin.add "Ren",-14135 
  273. Pinyin.add "Reng",-14125 
  274. Pinyin.add "Ri",-14123 
  275. Pinyin.add "Rong",-14122 
  276. Pinyin.add "Rou",-14112 
  277. Pinyin.add "Ru",-14109 
  278. Pinyin.add "Ruan",-14099 
  279. Pinyin.add "Rui",-14097 
  280. Pinyin.add "Run",-14094 
  281. Pinyin.add "Ruo",-14092 
  282. Pinyin.add "Sa",-14090 
  283. Pinyin.add "Sai",-14087 
  284. Pinyin.add "San",-14083 
  285. Pinyin.add "Sang",-13917 
  286. Pinyin.add "Sao",-13914 
  287. Pinyin.add "Se",-13910 
  288. Pinyin.add "Sen",-13907 
  289. Pinyin.add "Seng",-13906 
  290. Pinyin.add "Sha",-13905 
  291. Pinyin.add "Shai",-13896 
  292. Pinyin.add "Shan",-13894 
  293. Pinyin.add "Shang",-13878 
  294. Pinyin.add "Shao",-13870 
  295. Pinyin.add "She",-13859 
  296. Pinyin.add "Shen",-13847 
  297. Pinyin.add "Sheng",-13831 
  298. Pinyin.add "Shi",-13658 
  299. Pinyin.add "Shou",-13611 
  300. Pinyin.add "Shu",-13601 
  301. Pinyin.add "Shua",-13406 
  302. Pinyin.add "Shuai",-13404 
  303. Pinyin.add "Shuan",-13400 
  304. Pinyin.add "Shuang",-13398 
  305. Pinyin.add "Shui",-13395 
  306. Pinyin.add "Shun",-13391 
  307. Pinyin.add "Shuo",-13387 
  308. Pinyin.add "Si",-13383 
  309. Pinyin.add "Song",-13367 
  310. Pinyin.add "Sou",-13359 
  311. Pinyin.add "Su",-13356 
  312. Pinyin.add "Suan",-13343 
  313. Pinyin.add "Sui",-13340 
  314. Pinyin.add "Sun",-13329 
  315. Pinyin.add "Suo",-13326 
  316. Pinyin.add "Ta",-13318 
  317. Pinyin.add "Tai",-13147 
  318. Pinyin.add "Tan",-13138 
  319. Pinyin.add "Tang",-13120 
  320. Pinyin.add "Tao",-13107 
  321. Pinyin.add "Te",-13096 
  322. Pinyin.add "Teng",-13095 
  323. Pinyin.add "Ti",-13091 
  324. Pinyin.add "Tian",-13076 
  325. Pinyin.add "Tiao",-13068 
  326. Pinyin.add "Tie",-13063 
  327. Pinyin.add "Ting",-13060 
  328. Pinyin.add "Tong",-12888 
  329. Pinyin.add "Tou",-12875 
  330. Pinyin.add "Tu",-12871 
  331. Pinyin.add "Tuan",-12860 
  332. Pinyin.add "Tui",-12858 
  333. Pinyin.add "Tun",-12852 
  334. Pinyin.add "Tuo",-12849 
  335. Pinyin.add "Wa",-12838 
  336. Pinyin.add "Wai",-12831 
  337. Pinyin.add "Wan",-12829 
  338. Pinyin.add "Wang",-12812 
  339. Pinyin.add "Wei",-12802 
  340. Pinyin.add "Wen",-12607 
  341. Pinyin.add "Weng",-12597 
  342. Pinyin.add "Wo",-12594 
  343. Pinyin.add "Wu",-12585 
  344. Pinyin.add "Xi",-12556 
  345. Pinyin.add "Xia",-12359 
  346. Pinyin.add "Xian",-12346 
  347. Pinyin.add "Xiang",-12320 
  348. Pinyin.add "Xiao",-12300 
  349. Pinyin.add "Xie",-12120 
  350. Pinyin.add "Xin",-12099 
  351. Pinyin.add "Xing",-12089 
  352. Pinyin.add "Xiong",-12074 
  353. Pinyin.add "Xiu",-12067 
  354. Pinyin.add "Xu",-12058 
  355. Pinyin.add "Xuan",-12039 
  356. Pinyin.add "Xue",-11867 
  357. Pinyin.add "Xun",-11861 
  358. Pinyin.add "Ya",-11847 
  359. Pinyin.add "Yan",-11831 
  360. Pinyin.add "Yang",-11798 
  361. Pinyin.add "Yao",-11781 
  362. Pinyin.add "Ye",-11604 
  363. Pinyin.add "Yi",-11589 
  364. Pinyin.add "Yin",-11536 
  365. Pinyin.add "Ying",-11358 
  366. Pinyin.add "Yo",-11340 
  367. Pinyin.add "Yong",-11339 
  368. Pinyin.add "You",-11324 
  369. Pinyin.add "Yu",-11303 
  370. Pinyin.add "Yuan",-11097 
  371. Pinyin.add "Yue",-11077 
  372. Pinyin.add "Yun",-11067 
  373. Pinyin.add "Za",-11055 
  374. Pinyin.add "Zai",-11052 
  375. Pinyin.add "Zan",-11045 
  376. Pinyin.add "Zang",-11041 
  377. Pinyin.add "Zao",-11038 
  378. Pinyin.add "Ze",-11024 
  379. Pinyin.add "Zei",-11020 
  380. Pinyin.add "Zen",-11019 
  381. Pinyin.add "Zeng",-11018 
  382. Pinyin.add "Zha",-11014 
  383. Pinyin.add "Zhai",-10838 
  384. Pinyin.add "Zhan",-10832 
  385. Pinyin.add "Zhang",-10815 
  386. Pinyin.add "Zhao",-10800 
  387. Pinyin.add "Zhe",-10790 
  388. Pinyin.add "Zhen",-10780 
  389. Pinyin.add "Zheng",-10764 
  390. Pinyin.add "Zhi",-10587 
  391. Pinyin.add "Zhong",-10544 
  392. Pinyin.add "Zhou",-10533 
  393. Pinyin.add "Zhu",-10519 
  394. Pinyin.add "Zhua",-10331 
  395. Pinyin.add "Zhuai",-10329 
  396. Pinyin.add "Zhuan",-10328 
  397. Pinyin.add "Zhuang",-10322 
  398. Pinyin.add "Zhui",-10315 
  399. Pinyin.add "Zhun",-10309 
  400. Pinyin.add "Zhuo",-10307 
  401. Pinyin.add "Zi",-10296 
  402. Pinyin.add "Zong",-10281 
  403. Pinyin.add "Zou",-10274 
  404. Pinyin.add "Zu",-10270 
  405. Pinyin.add "Zuan",-10262 
  406. Pinyin.add "Zui",-10260 
  407. Pinyin.add "Zun",-10256 
  408. Pinyin.add "Zuo",-10254
  409. Function StrToPinyin(AscNum)
  410. If AscNum>0 and AscNum<160 Then
  411. StrToPinyin=Chr(AscNum)
  412. Else
  413. If AscNum<-20319 or AscNum>-10247 Then
  414. StrToPinyin=""
  415. Else
  416. PinyinId=Pinyin.Items
  417. PinyinStr=Pinyin.keys
  418. For i=Pinyin.Count-1 To 0 Step -1
  419. If PinyinId(i)<=AscNum Then Exit For
  420. Next
  421. StrToPinyin=PinyinStr(i)
  422. End If
  423. End If
  424. End Function 
  425. Function ToPinyin(ChangeStr)
  426. ToPinyin=""
  427. ChangeStr=Replace(ChangeStr,"{","")
  428. ChangeStr=Replace(ChangeStr,"}","")
  429. ChangeStr=Replace(ChangeStr,"(","")
  430. ChangeStr=Replace(ChangeStr,")","")
  431. ChangeStr=Replace(ChangeStr,"/","")
  432. ChangeStr=Replace(ChangeStr,"","")
  433. ChangeStr=Replace(ChangeStr,"&","")
  434. ChangeStr=Replace(ChangeStr,"@","")
  435. ChangeStr=Replace(ChangeStr,",","")
  436. ChangeStr=Replace(ChangeStr,"<","")
  437. ChangeStr=Replace(ChangeStr,">","")
  438. ChangeStr=Replace(ChangeStr,"《","")
  439. ChangeStr=Replace(ChangeStr,"》","")
  440. ChangeStr=Replace(ChangeStr,"|","")
  441. ChangeStr=Replace(ChangeStr,"=","")
  442. ChangeStr=Replace(ChangeStr,"+","")
  443. ChangeStr=Replace(ChangeStr," ","")
  444. ChangeStr=Replace(ChangeStr,"#","")
  445. For i=1 To len(ChangeStr)
  446. Select Case Mid(ChangeStr,i,1)
  447. Case "."
  448. ToPinyin=ToPinyin&"_"
  449. Case Else
  450. ToPinyin=ToPinyin&StrToPinyin(Asc(Mid(ChangeStr,i,1)))
  451. End Select
  452. Next
  453. End Function 
  454. Response.Write(ToPinyin(Request.QueryString("Str")))
  455. Session.CodePage=65001
  456. Response.Charset = "utf-8"
  457. %>