Chinese characters are transformed into pinyin

xiaoxiao2021-03-06  93

Many problems are because the file names caused by Chinese issues are best not to use Chinese now solving, which is generally generated, making this ID, filename.

Now use this transformation, just a lot.

Principle: Using the hashtable ht = new hashtable (10);

1. Add an index, such as: HT.PUT ("- 20295", "ang"); 2. Reverse traversal, such as: While (! Ht.containskey (integer.tostring (number))) Num--

<% @ page language = "java" import = "java.util. *" ContentType = "text / html"%> <%! Hashtable ht = new hashtable (10); string g (integer n) {int Num = n .intValue (); if (Num> 0 && num <160) {Return String.Valueof ((char) NUM);} else if (Num <-20319 || NUM> -10247) {Return "";} else {IF Ht.size () == 0) {b ();} while (! ht.containskey (integer.tostring (num))) Num--; → rTOString (NUM)). Tostring () }}} String c (string str) {char [] hz = str.tochararray (); int Len = str.length (); int p, q; string ret = ""; for (int i = 0; i < Len; i ) {p = (int) Hz [i]; if (p> 160) {q = (int) Hz [ i]; p = p * 256 q-65536;} RET = g (New Integer (p));} Return Ret;} void b () {HT.PUT ("- 20319", "a"); HT.PUT ("- 20317", "ai"); ht.put ("- 20304 "," AN "); HT.PUT (" - 20295 "," ang "); HT.PUT (" - 20292 "," ao "); HT.PUT (" - 20283 "," ba "); HT.PUT ("- 20265", "bai"); HT.PUT ("- 20257", "ban"); HT.PUT ("- 20242", "bang"); ht.put ("- 20230" , "bao"); HT.PUT ("- 20051", "bei"); HT.PUT ("- 20036", "BEN"); HT.PUT ("- 20032", "beng"); HT. PUT ("- 20026", "bi"); HT.PUT ("- 20002", "bian"); HT.PUT ("- 19990", "BI AO "); HT.PUT (" - 19986 "," Bie "); HT.PUT (" - 19982 "," bin "); HT.PUT (" - 19976 "," bing "); ht.put "-19805", "bo"); HT.PUT ("- 19784", "bu"); HT.PUT ("- 19775", "ca"); HT.PUT ("- 19774", "cai" ); HT.PUT ("- 19763", "can");

HT.PUT ("- 19756", "ca Gu"); HT.PUT ("- 19751", "cao"); HT.PUT ("- 19746", "ce"); HT.PUT ("- 19741 "CENG"); HT.PUT ("- 19739", "cha"); HT.PUT ("- 19728", "chai"); HT.PUT ("- 19725", "chan"); HT. PUT ("- 19715", "chang"); HT.PUT ("- 19540", "chao"); HT.PUT ("- 19531", "che"); HT.PUT ("- 19525", " "); HT.PUT (" - 19515 "," Cheng "); HT.PUT (" - 19500 "," chi "); HT.PUT (" - 19484 "," chong "); ht.put "-19479", "chou"); HT.PUT ("- 19467", "chu"); HT.PUT ("- 19289", "chuai"); HT.PUT ("- 19288", "chuan" HT.PUT ("- 19281", "chuang"); HT.PUT ("- 19275", "chui"); HT.PUT ("- 19270", "chun"); ht.put ("- 19263 "" Chuo "); HT.PUT (" - 19261 "," ci "); HT.PUT (" - 19249 "," CONG "); HT.PUT (" - 19243 "," cou "); HT.PUT ("- 19242", "cu"); HT.PUT ("- 19238", "cuan"); HT.PUT ("- 19235", "cui"); HT.PUT ("- 19227 , "Cun"); HT.PUT ("- 19224", "CUO"); HT.PUT ("- 19218", "DA"); HT.PUT ("- 19212", "DAI"); HT. PUT ("- 19038", "dan"); HT.PUT ("- 19023", "dang"); HT.PUT ("- 19018", "dao"); ht.put ("- 19006", " DE "); HT.PUT (" - 19003 "," deng "); HT.PUT (" - 18996 "," di "); HT.PUT (" - 18977 "," dian "); ht.put "-18961", "DIAO"); HT.PUT ("- 18952", " "); HT.PUT (" - 18783 "," ding "); HT.PUT (" - 18774 "," diu ");

HT.PUT ("- 18773", "dong"); HT.PUT ("- 18763", "dou"); HT.PUT ("- 18756", "du"); ht.put ("- 18741" , "Duan"); HT.PUT ("- 18735", "dui"); HT.PUT ("- 18731", "DUN"); HT.PUT ("- 18722", "duo"); HT. PUT ("- 18710", "e"); HT.PUT ("- 18697", "en"); HT.PUT ("- 18696", "ER"); HT.PUT ("- 18526", " FA "); HT.PUT (" - 18518 "," Fan "); HT.PUT (" - 18501 "," fang "); HT.PUT (" - 18490 "," fei "); ht.put "-18478", "fen"); HT.PUT ("- 18463", "feng"); HT.PUT ("- 18448", "fo"); HT.PUT ("- 18447", "fou" ); Ht.Put ("- 18446", "fu"); HT.PUT ("- 18239", "ga"); HT.PUT ("- 18237", "gai"); ht.put (" 18231 "," GaN "); HT.PUT (" - 18220 "," gang "); HT.PUT (" - 18211 "," gao "); HT.PUT (" - 18201 "," ge "); HT.PUT ("- 18184", "gei"); HT.PUT ("- 18183", "gen"); HT.PUT ("- 18181", "geng"); ht.put ("- 18012" , "gong"); HT.PUT ("- 17997", "gou"); HT.PUT ("- 17988", "gu"); HT.PUT ("- 17970", "gua"); HT. PUT ("- 17964", "guai"); HT.PUT ("- 17961", "guan"); HT.PUT ("- 17950", "guang"); ht.put ("- 17947", " "); HT.PUT (" - 17931 "," gun); HT.PUT ("- 17928", "guo"); HT.PUT ("- 17922", "ha"); ht.put "-17759", "hai"); HT.PUT ("- 17752", "han"); ht.put ("- 17733", " "); HT.PUT (" - 17730 "," hao "); ht.put (" - 17721 ","

HT.PUT ("- 17703", "hei"); HT.PUT ("- 17701", "hen"); HT.PUT ("- 17697", "heng"); ht.put "-17692", "hong"); HT.PUT ("- 17683", "hou"); HT.PUT ("- 17676", "hu"); ht.put ("- 17496", "hua" Ht.Put ("- 17487", "huai"); ht.put ("- 17482", "huan"); HT.PUT ("- 17468", "huang"); ht.put ("- 17454 "," hui "); HT.PUT (" - 17433 "," hun "); HT.PUT (" - 17427 "," huo "); HT.PUT (" - 17417 "," ji "); HT.PUT ("- 17202", "jia); HT.PUT (" - 17185 "," jian); ht.put ("- 16983", "jiang"); ht.put ("- 16970" "JIAO"); HT.PUT ("- 16942", "jie"); HT.PUT ("- 16915", "jin"); HT.PUT ("- 16733", "jing"); HT. PUT ("- 16708", "jiong"); HT.PUT ("- 16706", "jiu); HT.PUT (" - 16689 "," ju "); ht.put (" - 16664 "," "); HT.PUT (" - 16657 "," jue "); HT.PUT (" - 16647 "," jun "); HT.PUT (" - 16474 "," ka "); ht.put "-16470", "kai"); HT.PUT ("- 16465", "kan); HT.PUT (" - 16459 "," kang "); HT.PUT (" - 16452 "," kao " ); HT.PUT ("- 16448", "ke"); HT.PUT ("- 16433", "ken"); HT.PUT ("- 16429", "keng"); ht.put ("- 16427 "," kong "); HT.PUT (" - 16423 "," kou "); HT.PUT (" - 16419 "," ku "); HT.PUT (" - 16412 "," kua "); HT.PUT ("- 16407", "kuai"); HT.PUT ("- 16403", "kuan" ); HT.PUT ("- 16401", "kuang"); HT.PUT ("- 16393", "kui");

HT.PUT ("- 16220", "kun"); HT.PUT ("- 16216", "kuo"); HT.PUT ("- 16212", "la"); ht.put ("- 16205" , "lai"); HT.PUT ("- 16202", "la"); HT.PUT ("- 16187", "lang"); HT.PUT ("- 16180", "lao"); HT. PUT ("- 16171", "le"); HT.PUT ("- 16169", "lei"); HT.PUT ("- 16158", "leng"); ht.put ("- 16155", " Li "); HT.PUT (" - 15959 "," lia "); HT.PUT (" - 15958 "," lian); HT.PUT ("- 15944", "liang"); ht.put "-15933", "liao"); HT.PUT ("- 15920", "lie"); HT.PUT ("- 15915", "lin"); HT.PUT ("- 15903", "ling" HT.PUT ("- 15889", "liu"); HT.PUT ("- 15878", "long"); HT.PUT ("- 15707", "lou"); ht.put ("- 15701 "," Lu "); HT.PUT (" - 15681 "," lv "); HT.PUT (" - 15667 "," luan "); HT.PUT (" - 15661 "," lue "); HT.PUT ("- 15659", "lun"); HT.PUT ("- 15652", "luo"); HT.PUT ("- 15640", "mA"); ht.put ("- 15631" , "MAI"); HT.PUT ("- 15625", "Man"); HT.PUT ("- 15454", "mang"); HT.PUT ("- 15448", "mao"); HT. PUT ("- 15436", "me"); HT.PUT ("- 15435", "mei"); HT.PUT ("- 15419", "MEN"); HT.PUT ("- 15416", " "); HT.PUT (" - 15408 "," mi "); HT.PUT (" - 15394 "," mian); HT.PUT ("- 15385", "miao"); ht.put "-15377", "mie"); HT.PUT ("- 15375", "min"); ht.put ("- 15 "369", "ming"); HT.PUT ("- 15363", "miu"); HT.PUT ("- 15362"

, "Mo"); HT.PUT ("- 15183", "mou"); HT.PUT ("- 15180", "mu"); HT.PUT ("- 15165", "NA"); HT. PUT ("- 15158", "nai"); HT.PUT ("- 15153", "nan"); HT.PUT ("- 15150", "nang"); ht.put ("- 15149", " NAO "); HT.PUT (" - 15144 "," ne "); HT.PUT (" - 15143 "," nei "); HT.PUT (" - 15141 "," NEN "); ht.put "-15140", "neng"); HT.PUT ("- 15139", "ni"); HT.PUT ("- 15128", "nian"); HT.PUT ("- 15121", "niang" Ht.PUT ("- 15119", "NIAO"); HT.PUT ("- 15117", "NIE"); HT.PUT ("- 15110", "nin"); ht.put (" "" NING "); HT.PUT (" - 14941 "," niu "); HT.PUT (" - 14937 "," nong "); HT.PUT (" - 14933 "," nu "); HT.PUT ("- 14930", "NV"); HT.PUT ("- 14929", "nuan"); HT.PUT ("- 14928", "nue"); ht.put ("- 14926 , "NuO"); HT.PUT ("- 14922", "O"); HT.PUT ("- 14921", "OU"); HT.PUT ("- 14914", "PA"); HT. PUT ("- 14908", "pai"); HT.PUT ("- 14902", "PAN"); HT.PUT ("- 14894", "pang"); ht.put ("- 14889", " "); HT.PUT (" - 14882 "," pei "); HT.PUT (" - 14873 "," pen "); HT.PUT (" - 14871 "," peng "); ht.put "-14857", "pi"); HT.PUT ("- 14678", "pian); HT.PUT (" - 14674 "," piao "); HT.PUT (" - 14670 "," PIE " ); Ht.put ("- 14668", "pin"); HT.PUT ("- 14663", "ping"); ht.pu T ("- 14654", "PO"); HT.PUT ("- 14645", "pu"); ht.put ("

-14630 "," Qi "); HT.PUT (" - 14594 "," qia); HT.PUT ("- 14429", "qian"); HT.PUT ("- 14407", "qiang") Ht.Put ("- 14399", "qiao"); HT.PUT ("- 14384", "qie); ht.put (" - 14379 "," qin "); ht.put (" - 14368 "," qing "); HT.PUT (" - 14355 "," qiong); HT.PUT ("- 14353", "qiu); HT.PUT (" - 14345 "," qu "); HT .put ("- 14170", "quan"); HT.PUT ("- 14159", "que"); HT.PUT ("- 14151", "qun"); ht.put ("- 14149", "ran"); HT.PUT ("- 14145", "rang"); HT.PUT ("- 14140", "rao"); HT.PUT ("- 14137", "re"); ht.put ("-14135", "ren"); HT.PUT ("- 14125", "RENG"); HT.PUT ("- 14123", "ri"); ht.put ("- 14122", "rong "); HT.PUT (" - 14112 "," rou "); HT.PUT (" - 14109 "," ru "); ht.put (" - 14099 "," ruan "); ht.put (" -14097, "RUI"); HT.PUT ("- 14094", "run"); HT.PUT ("- 14092", "Ruo"); HT.PUT ("- 14090", "sa") Ht.PUT ("- 14087", "SAI"); HT.PUT ("- 14083", "SAN"); HT.PUT ("- 13917", "sang"); ht.put ("- 13914 "," SAO "); HT.PUT (" - 13910 "," SE "); HT.PUT (" - 13907 "," SEN "); HT.PUT (" - 13906 "," send "); HT .put ("- 13905", "sha"); ht.put ("- 13896", "shai"); HT.PUT ("- 13894", "shan"); HT.PUT ("- 13878", "Shang"); HT.PUT ("- 13870", "shao"); ht.put ("- 138 59, "SHE"); HT.PUT ("- 13847", "shen"); ht.put ("- 13831", "

"); HT.PUT (" - 13658 "," shi "); HT.PUT (" - 13611 "," shou "); HT.PUT (" - 13601 "," shu "); ht.put "-13406", "shua"); HT.PUT ("- 13404", "shuai"); HT.PUT ("- 13400", "shuan"); ht.put ("- 13398", "shuan" Ht.Put ("- 13395", "shui"); HT.PUT ("- 13391", "shun"); HT.PUT ("- 13387", "shuo"); ht.put (" 13383 "," Si "); HT.PUT (" - 13367 "," SONG "); HT.PUT (" - 13359 "," Sou "); HT.PUT (" - 13356 "," su "); HT.PUT ("- 13343", "suan); HT.PUT (" - 13340 "," sui "); HT.PUT (" - 13329 "," sun "); ht.put (" - 13326 " "suo"); HT.PUT ("- 13318", "ta"); HT.PUT ("- 13147", "tai"); HT.PUT ("- 13138", "tan"); HT. PUT ("- 13120", "tang"); HT.PUT ("- 13107", "tao"); HT.PUT ("- 13096", "te"); ht.put ("- 13095", " "); HT.PUT (" - 13091 "," ti "); HT.PUT (" - 13076 "," tian "); HT.PUT (" - 13068 "," tiao "); ht.put "-13063", "TIE"); HT.PUT ("- 13060", "ting"); ht.put ("- 12888", "tong"); ht.put ("- 12875", "tou" ); Ht.Put ("- 12871", "tu"); HT.PUT ("- 12860", "tuan"); HT.PUT ("- 12858", "tui"); ht.put (" 12852 "," TUN "); HT.PUT (" - 12849 "," TUO "); HT.PUT (" - 12838 "," WA "); HT.PUT (" - 12831 "," WAI "); HT.PUT ("- 12829", "wan"); HT.PUT ("- 12812", " "); HT.PUT (" - 12802 "," wei "); HT.PUT (" - 12607 "," wen ");

Ht.Put ("- 12597", "weng"); HT.PUT ("- 12594", "wo"); HT.PUT ("- 12585", "wu"); ht.put ("- 12556" , "xi"); HT.PUT ("- 12359", "xia); HT.PUT (" - 12346 "," xian); HT.PUT ("- 12320", "xiang"); HT. PUT ("- 12300", "xiao"); HT.PUT ("- 12120", "xie); HT.PUT (" - 12099 "," xin "); ht.put (" - 12089 "," "); HT.PUT (" - 12074 "," xiong); ht.put ("- 12067", "xiu); ht.put (" - 12058 "," xu "); ht.put "-12039", "xuan"); HT.PUT ("- 11867", "xue"); HT.PUT ("- 11861", "xun"); ht.put ("- 11847", "ya" ); Ht.put ("- 11831", "yan"); HT.PUT ("- 11798", "yang"); HT.PUT ("- 11781", "yao"); ht.put (" 11604 "," YE "); HT.PUT (" - 11589 "," yi "); HT.PUT (" - 11536 "," yin "); HT.PUT (" - 11358 "," ying "); HT.PUT ("- 11340", "yo"); HT.PUT ("- 11339", "yong"); HT.PUT ("- 11324", "you"); ht.put ("- 11303" , "yu"); HT.PUT ("- 11097", "yuan"); HT.PUT ("- 11077", "yue"); HT.PUT ("- 11067", "yun"); HT. PUT ("- 11055", "za"); HT.PUT ("- 11052", "zai"); HT.PUT ("- 11045", "zan"); ht.put ("- 11041", " "); HT.PUT (" - 11038 "," zao "); HT.PUT (" - 11024 "," ZE "); HT.PUT (" - 11020 "," ZEI "); ht.put "-11019", "zen"); HT.PUT ("- 11018", "zeng"); ht.put ("- 110 14 "," zha "); HT.PUT (" - 10838 "," zhai "); ht.put (" - 10832 "

"ZHAN"); HT.PUT ("- 10815", "zhang"); HT.PUT ("- 10800", "zhao"); HT.PUT ("- 10790", "zhe"); HT. PUT ("- 10780", "zhen"); HT.PUT ("- 10764", "zheng"); HT.PUT ("- 10587", "zhi"); ht.put ("- 10544", " "); HT.PUT (" - 10533 "," zhou "); HT.PUT (" - 10519 "," zhu "); HT.PUT (" - 10331 "," zhua "); ht.put "-10329", "zhuai"); HT.PUT ("- 10328", "zhuan); ht.put (" - 10322 "," zhuang "); ht.put (" - 10315 "," zhui " Ht.Put ("- 10309", "zhun"); HT.PUT ("- 10307", "zhuo"); HT.PUT ("- 10296", "zi"); ht.put ("- 10281 "," zong "); HT.PUT (" - 10274 "," zou "); HT.PUT (" - 10270 "," zu "); HT.PUT (" - 10262 "," zuan "); HT.PUT ("- 10260", "zui"); HT.PUT ("- 10256", "zun"); HT.PUT ("- 10254", "zuo"); ht.put ("- 10247" , "ZZ");}%> <% IF (Request.getParameter ("Hz")! = null) {Out.println (C (Request.GetParameter ("Hz"))))));}%>

Please enter Chinese: The principle of transformation of Chinese characters to pinyin is the first principle to transform the Chinese characters into the internal code, and then look up through the internal code and pinyin.

The detailed code is as follows:

public class chs2py {///

/// will be converted into Chinese characters spelling /// Author: Blacksmith (chinahuman) /// completed in: March 12, 2004 morning ///

Private static int [] pyvalue =

NEW int [] {- ​​20319, -20317, -20304, -20295, -20292, -20283, -20265, -20257, -20242, -20230, -20051, -20036, -20032, -20026, -20002, -19990, -19986, -19982, -19976, -19775, -19774, -19775, -19774, -19763, -19756, -19751, -19746, -19741, -19739, -19728, -19725, -19715 , -19540, -19531, -19525, -19515, -19500, -19484, -19479, -19467, -19289, -19288, -19281, -19275, -19270, -19263, -19261, -19249, - 19243, -19242, -19238, -19235, -19227, -19224, -19218, -19212, -19038, -19023, -19018, -19006, -19003, -18996, -18977, -18961, -18952, -18783, -18774, -18773, -18763, -18756, -18741, -18735, -18731, -18722, -18710, -18697, -18696, -18526, -18518, -18501, -18490, -18478 , -18463, -18448, -18447, -18446, -18239, -18220, -18211, -18201, -1818184, -18183, -18181, -18012, -17997, -17988, 17970, -17964, -17961, -17950, -17947, -17931, -17928, -17922, -17759, -17752, -177733, -17752, -177733, -1773, -177721, -17703, -177701, -17697, -17692, -17683, -17676, -17496, -17487, -17482, -17468, -17454, -17433, -17427, -17417, -17427, -17417, -17202, -17185, -16983, -16970, -16942, -16915, -16733 , -16708, -16706, -16689, -16664, -16657 , -16647, -16474, -16470, -16465, -16459, -16452, -16448, -16433, -16429, -16427, -16423, -16419, -16412, -16407, -16403, -16401, - 16393, -16220, -16216, -16212, -16205, -16202, -16187, -16180, -16171, -16169, -16158, -16155, -15959, -15958, -15944, -15933, -15920, -15915, -15903, -15889, -15878, -15707, -15701, -15681, -15667, -15661, -15659, -15652, -15640, -15631, -15625,-15454,-15448,-15436 , -15435, -15419, -15416, -15408, -15394, -15385, -15377, -15375, -15369, -15363, -15362, -15183,-15180, -15165, -15158, -15153, 15150, -15149, -15144, -15143, -15141, -15140, -15139, -15128, -15121, -15119, -15117, -15110, -15109, -14941, -14937, -14933, -14930, -14929, -14928, -14926, -14914, -14921, -14914, -14908, -14902, -14894, -14889, -148882, -14873, -14871, -14857, -14678, -14674, -14670 , -14668, -14663, -14654,

-14645, -14630, -14594, -14429, -14407, -14399, -14384, -14379, -14368, -14355, -14353, -14345, -14170, -14159, -14151, -14149, -14145 , -14140, -14137, -14135, -14125, -14123, -14122, -14112, -14109, -14099, -14097, -14094, -14092, -14090, -14087, -14083, -13917, 13914, -13910, -13907, -13906, -13905, -13896, -13894, -13878, -13870, -13859, -13847, -13831, -13658, -13611, -13601, -13406, -13404, -13400, -13398, -13395, -13383, -13387, -13383, -133367, -13359, -133356, -13343, -13340, -13329, -13326, -13318, -13147, -13138, -13120 , -13107, -13091, -13076, -13068, -13063, -13060, -12888, -12875, -12871, -12860, -12858, -12852, -12849, -12838, - 12831, -12829, -12812, -12802, -12607, -12597, -12594, -12585, -125556, -12359, -12346, -12320, -12300, -12120, -12099, -12089, -12074, -12067, -12058, -12039, -11867, -11861, -11847, -11831, -11798, -11781, -11604, -11589, -11536, -11358, -11340,-11339,-11324,-11303 -11097, -11055, -11052, -11045, -11041, -11038,-11024, -11020, -110838, -10832, -10815, -10832, -10815 10800, -10790, -10780, -10764, -10587, -1 0544, -10533, -10519, -103331, -10329, -10328, -10322, -10315, -10309, -10307, ​​-10296, -10281, -10274, -10270, -10262, -10260, -10256, -10254}; private static string [] pystr = new string [] {"A", "Ai", "AN", "Ang", "Ao", "Ba", "Bai", "Ban", "Bang "," Bao "," BEI "," Ben "," BI "," BI "," BIE "," BIN "," Bing "," Bo "," BU ", "CA", "CAI", "CAN", "CANG", "CAO", "Ce", "CENG", "CHA", "CHAI", "CHAN", "CHAO", "CHE "," Chen "," Cheng "," Chi "," CHONG "," Chou "," Chu ",

"Chuai", "Chuan", "Chuang", "CHUI", "Chun", "Chuo", "CI", "CONG", "CU", "Cuan", "CUI", "Cun" "," Cuo "," Da "," DAI "," DAN "," DANG "," DAO "," DENG "," Di "," Dian "," DIAO "," Die ", "DING", "Diu", "DONG", "DOU", "DU", "Duan", "DUI", "DUN", "Duo", "E", "EN", "ER", "FA "," Fan "," Fang "," FEI "," FEN "," FENG "," FO "," FOU "," FU "," GA "," Gai "," Gan "," Gang ", "Gao", "GE", "GEI", "Gen", "GENG", "GONG", "Gou", "Gua", "Guai", "Guan", "Guang", "GUI "," Gun "," Guo "," Ha "," Hai "," Han "," HANG "," Hao "," HON "," HEN "," HENG "," HONG ", "hou", "hu", "hua", "huai", "hun", "huang", "hun", "huo", "ji", "jia", "jian", "jiang" "JIAO", "Jie", "JIN", "Jiong", "Jiu", "JU", "Juan", "JUE", "Jun", "KA", "Kai", "Kan", "Kang", "Kao", "KE", "KEN", "KENG", "KONG", "Kou", "KUA", "Kuai", "Kuan", "Kuang" "," KUI "," KUN "," Kuo "," la "," lai "," lan "," lang "," lao "," le ",

"LEI", "Leng", "Li", "LIA", "Lian", "Liang", "LIAO", "LIE", "LIN", "Ling", "Liu", "long", "lou "," Lu "," LV "," Luan "," Lue "," LUN "," Luo "," MA "," MAI "," MAN "," Mang "," Mao "," ME ", "Mei", "Men", "MENG", "Mi", "Mian", "MIAO", "MIE", "MIN", "MING", "MOU", "MO", "Mou", "MU "," NA "," Nai "," Nan "," NANG "," NAO "," NEEN "," NIEN "," NENG "," Ni "," Nian "," Niang ", "NIAO", "NIE", "NIN", "NING", "NIU", "Nong", "Nu", "NV", "Nuan", "NUE", "Nu", "O", "OU "," PA "," PAI "," Pan "," Pang "," PAO "," PI "," PENG "," Pi "," Pian "," PIAO "," PIE ", "PIN", "Ping", "Po", "PU", "Qi", "QIA", "QIANG", "QIAO", "QIE", "QIN", "qing", "qiong" "Qiu", "Qu", "QUE", "Qun", "Ran", "Rang", "Rao", "RE", "REN", "RENG", "Ri", "Rong", "Rou", "Ru", "Ruan", "RUI", "Run", "Ruo", "SA", "SAI", "SAN", "SANG", "Sao", "SE "," Sen "," SENG "," SHA "," SHAI "," SHAN "," SHANG "," SHAO "," SHE "," SHEN ",

"SHENG", "Shi", "shou", "shu", "shua", "shuan", "shuan", "shun", "shuo", "Si", "Song "Sou", "su", "su", "su", "su", "su", "ta", "tai", "tan", "tang", "tao", "te", "TENG", "Ti", "Tian", "Tiao", "TIE", "Ting", "Tong", "TUAN", "TUI", "Tun", "TUO "," WA "," Wai "," Wan "," WANG "," WEI "," WENG "," Wo "," WU "," Xi "," XIA "," Xian ", "xiang", "xiao", "xie", "xin", "xing", "xiong", "xiu", "xu", "xu", "xun", "ya", "Yan "," YANG "," YAO "," Ye "," Yi "," YIN "," Ying "," Yo "," Yong "," YU "," YUAN "," Yue ", "Yun", "ZA", "Zai", "ZAN", "Zang", "ZAO", "Ze", "Zei", "ZENG", "ZHA", "ZHAI", "ZHAN "ZHANG", "ZHAO", "ZHE", "zhen", "zHENG", "zhu", "zhua", "zhuai", "zhuan", "zhuang", "zhui", "zhun", "zhuo", "zi", "zong", "zou", "zu", "zuan", "zui", "zun",

"zuo"}; public chs2py () {// // Todo: Add constructor logic //} public static string convert (String chrstr) {byte [] array = new byte [2]; string returnstr = " "; Int CHRASC = 0; INT I1 = 0; int I2 = 0; char [] nowchar = chrstr.tochararray (); for (int J = 0; j 0 && Chrasc <160) {Returnstr = NOWCHAR [J];} else {for (INT i = (pyvalue.length -1); i> = 0; I -) {IF (pyvalue [i] <= chrasc) {returnstr = pystr [i]; break;}}}} Return Returnstr;

}

转载请注明原文地址:https://www.9cbs.com/read-126862.html

New Post(0)