- 浏览: 250514 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (179)
- Spring3.0 (28)
- HIbernate3.5.6 (35)
- Struts2.1.8 (42)
- JSP (1)
- Servlet (0)
- JAVASE (16)
- JavaWeb (1)
- javaEE (0)
- SSH2整合 (0)
- EJB (0)
- Oracle (7)
- Ajax (7)
- Quartz作业调度框架 (6)
- jsValidationFramework (1)
- FCKeditor (1)
- ExtJS (29)
- JSF (0)
- JPA (0)
- JBoss Seam (0)
- JSON (0)
- Webservice (0)
- JQuery (1)
- Javascript (1)
- Css+DIV (0)
- Lunch (0)
- Linux (0)
- PHP (0)
- XML (1)
- Ibatis (0)
- DWR (0)
- DWZ (0)
最新评论
-
Nabulio:
good
Spring配置SessionFactory -
唤流年:
[color=red][/color] ...
Spring配置SessionFactory -
wangcl011:
Oracle通过数据泵网络导入另一个数据库,不生成DMP文件, ...
oracle命令导入dmp文件 -
rochou:
第一个Hibernate实现CRUD -
ningwuyu:
Entity 类是那个jar里面的
PropertyUtils MethodUtils用法
输入中文显示中文全拼音
- 博客分类:
- JAVASE
import java.io.Serializable; import java.util.ArrayList; public class JString { private static ArrayList<PinyinCode> pinyin = new ArrayList<PinyinCode>(); /** * 该方法返回一个字符串的拼音,对于要做敏感字 * 检查时应该一个字一个字来获取其拼音以免无法 * 得知每个字对应的拼音。 * @author zyj * @param word * @return String */ public static String getPinyin(String word) { String pinyin = ""; for (int i = 0; i < word.length(); i++) pinyin += getPinyin2(getCode(word.charAt(i))); return pinyin; } /** * 该方法通过DBCS的编码值到哈希表中查询得到对应的拼音串 * @param hz * @return String */ protected static String getPinyin2(int hz) { String py = ""; if (hz > 0 && hz < 160) py += (char)hz; //else if (hz < -20319 || hz > -10247); else if (hz <= -10247 && hz >= -20319) { PinyinCode pc = null; int i = pinyin.size() - 1; for (; i >= 0; i--) { pc = (PinyinCode) pinyin.get(i); if (pc.code <= hz) break; } if (i >= 0) py = pc.pinyin; } return py; } public static void main(String args[]) { System.out.println(JString.getPinyin("死死死死死死")); } /** * 该方法返回一个字符的DBCS编码值 * @param cc * @return int */ protected static int getCode(char cc) { byte[] bs = String.valueOf(cc).getBytes(); int code = 0; //int code = (bs[0] << 8) | (bs[1] & 0x00FF); if (bs.length < 2) code = (int) cc; else code = (bs[0] << 8) | (bs[1] & 0x00FF); bs = null; return code; } static { pinyin.add(new PinyinCode("a", -20319)); pinyin.add(new PinyinCode("ai", -20317)); pinyin.add(new PinyinCode("an", -20304)); pinyin.add(new PinyinCode("ang", -20295)); pinyin.add(new PinyinCode("ao", -20292)); pinyin.add(new PinyinCode("ba", -20283)); pinyin.add(new PinyinCode("bai", -20265)); pinyin.add(new PinyinCode("ban", -20257)); pinyin.add(new PinyinCode("bang", -20242)); pinyin.add(new PinyinCode("bao", -20230)); pinyin.add(new PinyinCode("bei", -20051)); pinyin.add(new PinyinCode("ben", -20036)); pinyin.add(new PinyinCode("beng", -20032)); pinyin.add(new PinyinCode("bi", -20026)); pinyin.add(new PinyinCode("bian", -20002)); pinyin.add(new PinyinCode("biao", -19990)); pinyin.add(new PinyinCode("bie", -19986)); pinyin.add(new PinyinCode("bin", -19982)); pinyin.add(new PinyinCode("bing", -19976)); pinyin.add(new PinyinCode("bo", -19805)); pinyin.add(new PinyinCode("bu", -19784)); pinyin.add(new PinyinCode("ca", -19775)); pinyin.add(new PinyinCode("cai", -19774)); pinyin.add(new PinyinCode("can", -19763)); pinyin.add(new PinyinCode("cang", -19756)); pinyin.add(new PinyinCode("cao", -19751)); pinyin.add(new PinyinCode("ce", -19746)); pinyin.add(new PinyinCode("ceng", -19741)); pinyin.add(new PinyinCode("cha", -19739)); pinyin.add(new PinyinCode("chai", -19728)); pinyin.add(new PinyinCode("chan", -19725)); pinyin.add(new PinyinCode("chang", -19715)); pinyin.add(new PinyinCode("chao", -19540)); pinyin.add(new PinyinCode("che", -19531)); pinyin.add(new PinyinCode("chen", -19525)); pinyin.add(new PinyinCode("cheng", -19515)); pinyin.add(new PinyinCode("chi", -19500)); pinyin.add(new PinyinCode("chong", -19484)); pinyin.add(new PinyinCode("chou", -19479)); pinyin.add(new PinyinCode("chu", -19467)); pinyin.add(new PinyinCode("chuai", -19289)); pinyin.add(new PinyinCode("chuan", -19288)); pinyin.add(new PinyinCode("chuang", -19281)); pinyin.add(new PinyinCode("chui", -19275)); pinyin.add(new PinyinCode("chun", -19270)); pinyin.add(new PinyinCode("chuo", -19263)); pinyin.add(new PinyinCode("ci", -19261)); pinyin.add(new PinyinCode("cong", -19249)); pinyin.add(new PinyinCode("cou", -19243)); pinyin.add(new PinyinCode("cu", -19242)); pinyin.add(new PinyinCode("cuan", -19238)); pinyin.add(new PinyinCode("cui", -19235)); pinyin.add(new PinyinCode("cun", -19227)); pinyin.add(new PinyinCode("cuo", -19224)); pinyin.add(new PinyinCode("da", -19218)); pinyin.add(new PinyinCode("dai", -19212)); pinyin.add(new PinyinCode("dan", -19038)); pinyin.add(new PinyinCode("dang", -19023)); pinyin.add(new PinyinCode("dao", -19018)); pinyin.add(new PinyinCode("de", -19006)); pinyin.add(new PinyinCode("deng", -19003)); pinyin.add(new PinyinCode("di", -18996)); pinyin.add(new PinyinCode("dian", -18977)); pinyin.add(new PinyinCode("diao", -18961)); pinyin.add(new PinyinCode("die", -18952)); pinyin.add(new PinyinCode("ding", -18783)); pinyin.add(new PinyinCode("diu", -18774)); pinyin.add(new PinyinCode("dong", -18773)); pinyin.add(new PinyinCode("dou", -18763)); pinyin.add(new PinyinCode("du", -18756)); pinyin.add(new PinyinCode("duan", -18741)); pinyin.add(new PinyinCode("dui", -18735)); pinyin.add(new PinyinCode("dun", -18731)); pinyin.add(new PinyinCode("duo", -18722)); pinyin.add(new PinyinCode("e", -18710)); pinyin.add(new PinyinCode("en", -18697)); pinyin.add(new PinyinCode("er", -18696)); pinyin.add(new PinyinCode("fa", -18526)); pinyin.add(new PinyinCode("fan", -18518)); pinyin.add(new PinyinCode("fang", -18501)); pinyin.add(new PinyinCode("fei", -18490)); pinyin.add(new PinyinCode("fen", -18478)); pinyin.add(new PinyinCode("feng", -18463)); pinyin.add(new PinyinCode("fo", -18448)); pinyin.add(new PinyinCode("fou", -18447)); pinyin.add(new PinyinCode("fu", -18446)); pinyin.add(new PinyinCode("ga", -18239)); pinyin.add(new PinyinCode("gai", -18237)); pinyin.add(new PinyinCode("gan", -18231)); pinyin.add(new PinyinCode("gang", -18220)); pinyin.add(new PinyinCode("gao", -18211)); pinyin.add(new PinyinCode("ge", -18201)); pinyin.add(new PinyinCode("gei", -18184)); pinyin.add(new PinyinCode("gen", -18183)); pinyin.add(new PinyinCode("geng", -18181)); pinyin.add(new PinyinCode("gong", -18012)); pinyin.add(new PinyinCode("gou", -17997)); pinyin.add(new PinyinCode("gu", -17988)); pinyin.add(new PinyinCode("gua", -17970)); pinyin.add(new PinyinCode("guai", -17964)); pinyin.add(new PinyinCode("guan", -17961)); pinyin.add(new PinyinCode("guang", -17950)); pinyin.add(new PinyinCode("gui", -17947)); pinyin.add(new PinyinCode("gun", -17931)); pinyin.add(new PinyinCode("guo", -17928)); pinyin.add(new PinyinCode("ha", -17922)); pinyin.add(new PinyinCode("hai", -17759)); pinyin.add(new PinyinCode("han", -17752)); pinyin.add(new PinyinCode("hang", -17733)); pinyin.add(new PinyinCode("hao", -17730)); pinyin.add(new PinyinCode("he", -17721)); pinyin.add(new PinyinCode("hei", -17703)); pinyin.add(new PinyinCode("hen", -17701)); pinyin.add(new PinyinCode("heng", -17697)); pinyin.add(new PinyinCode("hong", -17692)); pinyin.add(new PinyinCode("hou", -17683)); pinyin.add(new PinyinCode("hu", -17676)); pinyin.add(new PinyinCode("hua", -17496)); pinyin.add(new PinyinCode("huai", -17487)); pinyin.add(new PinyinCode("huan", -17482)); pinyin.add(new PinyinCode("huang", -17468)); pinyin.add(new PinyinCode("hui", -17454)); pinyin.add(new PinyinCode("hun", -17433)); pinyin.add(new PinyinCode("huo", -17427)); pinyin.add(new PinyinCode("ji", -17417)); pinyin.add(new PinyinCode("jia", -17202)); pinyin.add(new PinyinCode("jian", -17185)); pinyin.add(new PinyinCode("jiang", -16983)); pinyin.add(new PinyinCode("jiao", -16970)); pinyin.add(new PinyinCode("jie", -16942)); pinyin.add(new PinyinCode("jin", -16915)); pinyin.add(new PinyinCode("jing", -16733)); pinyin.add(new PinyinCode("jiong", -16708)); pinyin.add(new PinyinCode("jiu", -16706)); pinyin.add(new PinyinCode("ju", -16689)); pinyin.add(new PinyinCode("juan", -16664)); pinyin.add(new PinyinCode("jue", -16657)); pinyin.add(new PinyinCode("jun", -16647)); pinyin.add(new PinyinCode("ka", -16474)); pinyin.add(new PinyinCode("kai", -16470)); pinyin.add(new PinyinCode("kan", -16465)); pinyin.add(new PinyinCode("kang", -16459)); pinyin.add(new PinyinCode("kao", -16452)); pinyin.add(new PinyinCode("ke", -16448)); pinyin.add(new PinyinCode("ken", -16433)); pinyin.add(new PinyinCode("keng", -16429)); pinyin.add(new PinyinCode("kong", -16427)); pinyin.add(new PinyinCode("kou", -16423)); pinyin.add(new PinyinCode("ku", -16419)); pinyin.add(new PinyinCode("kua", -16412)); pinyin.add(new PinyinCode("kuai", -16407)); pinyin.add(new PinyinCode("kuan", -16403)); pinyin.add(new PinyinCode("kuang", -16401)); pinyin.add(new PinyinCode("kui", -16393)); pinyin.add(new PinyinCode("kun", -16220)); pinyin.add(new PinyinCode("kuo", -16216)); pinyin.add(new PinyinCode("la", -16212)); pinyin.add(new PinyinCode("lai", -16205)); pinyin.add(new PinyinCode("lan", -16202)); pinyin.add(new PinyinCode("lang", -16187)); pinyin.add(new PinyinCode("lao", -16180)); pinyin.add(new PinyinCode("le", -16171)); pinyin.add(new PinyinCode("lei", -16169)); pinyin.add(new PinyinCode("leng", -16158)); pinyin.add(new PinyinCode("li", -16155)); pinyin.add(new PinyinCode("lia", -15959)); pinyin.add(new PinyinCode("lian", -15958)); pinyin.add(new PinyinCode("liang", -15944)); pinyin.add(new PinyinCode("liao", -15933)); pinyin.add(new PinyinCode("lie", -15920)); pinyin.add(new PinyinCode("lin", -15915)); pinyin.add(new PinyinCode("ling", -15903)); pinyin.add(new PinyinCode("liu", -15889)); pinyin.add(new PinyinCode("long", -15878)); pinyin.add(new PinyinCode("lou", -15707)); pinyin.add(new PinyinCode("lu", -15701)); pinyin.add(new PinyinCode("lv", -15681)); pinyin.add(new PinyinCode("luan", -15667)); pinyin.add(new PinyinCode("lue", -15661)); pinyin.add(new PinyinCode("lun", -15659)); pinyin.add(new PinyinCode("luo", -15652)); pinyin.add(new PinyinCode("ma", -15640)); pinyin.add(new PinyinCode("mai", -15631)); pinyin.add(new PinyinCode("man", -15625)); pinyin.add(new PinyinCode("mang", -15454)); pinyin.add(new PinyinCode("mao", -15448)); pinyin.add(new PinyinCode("me", -15436)); pinyin.add(new PinyinCode("mei", -15435)); pinyin.add(new PinyinCode("men", -15419)); pinyin.add(new PinyinCode("meng", -15416)); pinyin.add(new PinyinCode("mi", -15408)); pinyin.add(new PinyinCode("mian", -15394)); pinyin.add(new PinyinCode("miao", -15385)); pinyin.add(new PinyinCode("mie", -15377)); pinyin.add(new PinyinCode("min", -15375)); pinyin.add(new PinyinCode("ming", -15369)); pinyin.add(new PinyinCode("miu", -15363)); pinyin.add(new PinyinCode("mo", -15362)); pinyin.add(new PinyinCode("mou", -15183)); pinyin.add(new PinyinCode("mu", -15180)); pinyin.add(new PinyinCode("na", -15165)); pinyin.add(new PinyinCode("nai", -15158)); pinyin.add(new PinyinCode("nan", -15153)); pinyin.add(new PinyinCode("nang", -15150)); pinyin.add(new PinyinCode("nao", -15149)); pinyin.add(new PinyinCode("ne", -15144)); pinyin.add(new PinyinCode("nei", -15143)); pinyin.add(new PinyinCode("nen", -15141)); pinyin.add(new PinyinCode("neng", -15140)); pinyin.add(new PinyinCode("ni", -15139)); pinyin.add(new PinyinCode("nian", -15128)); pinyin.add(new PinyinCode("niang", -15121)); pinyin.add(new PinyinCode("niao", -15119)); pinyin.add(new PinyinCode("nie", -15117)); pinyin.add(new PinyinCode("nin", -15110)); pinyin.add(new PinyinCode("ning", -15109)); pinyin.add(new PinyinCode("niu", -14941)); pinyin.add(new PinyinCode("nong", -14937)); pinyin.add(new PinyinCode("nu", -14933)); pinyin.add(new PinyinCode("nv", -14930)); pinyin.add(new PinyinCode("nuan", -14929)); pinyin.add(new PinyinCode("nue", -14928)); pinyin.add(new PinyinCode("nuo", -14926)); pinyin.add(new PinyinCode("o", -14922)); pinyin.add(new PinyinCode("ou", -14921)); pinyin.add(new PinyinCode("pa", -14914)); pinyin.add(new PinyinCode("pai", -14908)); pinyin.add(new PinyinCode("pan", -14902)); pinyin.add(new PinyinCode("pang", -14894)); pinyin.add(new PinyinCode("pao", -14889)); pinyin.add(new PinyinCode("pei", -14882)); pinyin.add(new PinyinCode("pen", -14873)); pinyin.add(new PinyinCode("peng", -14871)); pinyin.add(new PinyinCode("pi", -14857)); pinyin.add(new PinyinCode("pian", -14678)); pinyin.add(new PinyinCode("piao", -14674)); pinyin.add(new PinyinCode("pie", -14670)); pinyin.add(new PinyinCode("pin", -14668)); pinyin.add(new PinyinCode("ping", -14663)); pinyin.add(new PinyinCode("po", -14654)); pinyin.add(new PinyinCode("pu", -14645)); pinyin.add(new PinyinCode("qi", -14630)); pinyin.add(new PinyinCode("qia", -14594)); pinyin.add(new PinyinCode("qian", -14429)); pinyin.add(new PinyinCode("qiang", -14407)); pinyin.add(new PinyinCode("qiao", -14399)); pinyin.add(new PinyinCode("qie", -14384)); pinyin.add(new PinyinCode("qin", -14379)); pinyin.add(new PinyinCode("qing", -14368)); pinyin.add(new PinyinCode("qiong", -14355)); pinyin.add(new PinyinCode("qiu", -14353)); pinyin.add(new PinyinCode("qu", -14345)); pinyin.add(new PinyinCode("quan", -14170)); pinyin.add(new PinyinCode("que", -14159)); pinyin.add(new PinyinCode("qun", -14151)); pinyin.add(new PinyinCode("ran", -14149)); pinyin.add(new PinyinCode("rang", -14145)); pinyin.add(new PinyinCode("rao", -14140)); pinyin.add(new PinyinCode("re", -14137)); pinyin.add(new PinyinCode("ren", -14135)); pinyin.add(new PinyinCode("reng", -14125)); pinyin.add(new PinyinCode("ri", -14123)); pinyin.add(new PinyinCode("rong", -14122)); pinyin.add(new PinyinCode("rou", -14112)); pinyin.add(new PinyinCode("ru", -14109)); pinyin.add(new PinyinCode("ruan", -14099)); pinyin.add(new PinyinCode("rui", -14097)); pinyin.add(new PinyinCode("run", -14094)); pinyin.add(new PinyinCode("ruo", -14092)); pinyin.add(new PinyinCode("sa", -14090)); pinyin.add(new PinyinCode("sai", -14087)); pinyin.add(new PinyinCode("san", -14083)); pinyin.add(new PinyinCode("sang", -13917)); pinyin.add(new PinyinCode("sao", -13914)); pinyin.add(new PinyinCode("se", -13910)); pinyin.add(new PinyinCode("sen", -13907)); pinyin.add(new PinyinCode("seng", -13906)); pinyin.add(new PinyinCode("sha", -13905)); pinyin.add(new PinyinCode("shai", -13896)); pinyin.add(new PinyinCode("shan", -13894)); pinyin.add(new PinyinCode("shang", -13878)); pinyin.add(new PinyinCode("shao", -13870)); pinyin.add(new PinyinCode("she", -13859)); pinyin.add(new PinyinCode("shen", -13847)); pinyin.add(new PinyinCode("sheng", -13831)); pinyin.add(new PinyinCode("shi", -13658)); pinyin.add(new PinyinCode("shou", -13611)); pinyin.add(new PinyinCode("shu", -13601)); pinyin.add(new PinyinCode("shua", -13406)); pinyin.add(new PinyinCode("shuai", -13404)); pinyin.add(new PinyinCode("shuan", -13400)); pinyin.add(new PinyinCode("shuang", -13398)); pinyin.add(new PinyinCode("shui", -13395)); pinyin.add(new PinyinCode("shun", -13391)); pinyin.add(new PinyinCode("shuo", -13387)); pinyin.add(new PinyinCode("si", -13383)); pinyin.add(new PinyinCode("song", -13367)); pinyin.add(new PinyinCode("sou", -13359)); pinyin.add(new PinyinCode("su", -13356)); pinyin.add(new PinyinCode("suan", -13343)); pinyin.add(new PinyinCode("sui", -13340)); pinyin.add(new PinyinCode("sun", -13329)); pinyin.add(new PinyinCode("suo", -13326)); pinyin.add(new PinyinCode("ta", -13318)); pinyin.add(new PinyinCode("tai", -13147)); pinyin.add(new PinyinCode("tan", -13138)); pinyin.add(new PinyinCode("tang", -13120)); pinyin.add(new PinyinCode("tao", -13107)); pinyin.add(new PinyinCode("te", -13096)); pinyin.add(new PinyinCode("teng", -13095)); pinyin.add(new PinyinCode("ti", -13091)); pinyin.add(new PinyinCode("tian", -13076)); pinyin.add(new PinyinCode("tiao", -13068)); pinyin.add(new PinyinCode("tie", -13063)); pinyin.add(new PinyinCode("ting", -13060)); pinyin.add(new PinyinCode("tong", -12888)); pinyin.add(new PinyinCode("tou", -12875)); pinyin.add(new PinyinCode("tu", -12871)); pinyin.add(new PinyinCode("tuan", -12860)); pinyin.add(new PinyinCode("tui", -12858)); pinyin.add(new PinyinCode("tun", -12852)); pinyin.add(new PinyinCode("tuo", -12849)); pinyin.add(new PinyinCode("wa", -12838)); pinyin.add(new PinyinCode("wai", -12831)); pinyin.add(new PinyinCode("wan", -12829)); pinyin.add(new PinyinCode("wang", -12812)); pinyin.add(new PinyinCode("wei", -12802)); pinyin.add(new PinyinCode("wen", -12607)); pinyin.add(new PinyinCode("weng", -12597)); pinyin.add(new PinyinCode("wo", -12594)); pinyin.add(new PinyinCode("wu", -12585)); pinyin.add(new PinyinCode("xi", -12556)); pinyin.add(new PinyinCode("xia", -12359)); pinyin.add(new PinyinCode("xian", -12346)); pinyin.add(new PinyinCode("xiang", -12320)); pinyin.add(new PinyinCode("xiao", -12300)); pinyin.add(new PinyinCode("xie", -12120)); pinyin.add(new PinyinCode("xin", -12099)); pinyin.add(new PinyinCode("xing", -12089)); pinyin.add(new PinyinCode("xiong", -12074)); pinyin.add(new PinyinCode("xiu", -12067)); pinyin.add(new PinyinCode("xu", -12058)); pinyin.add(new PinyinCode("xuan", -12039)); pinyin.add(new PinyinCode("xue", -11867)); pinyin.add(new PinyinCode("xun", -11861)); pinyin.add(new PinyinCode("ya", -11847)); pinyin.add(new PinyinCode("yan", -11831)); pinyin.add(new PinyinCode("yang", -11798)); pinyin.add(new PinyinCode("yao", -11781)); pinyin.add(new PinyinCode("ye", -11604)); pinyin.add(new PinyinCode("yi", -11589)); pinyin.add(new PinyinCode("yin", -11536)); pinyin.add(new PinyinCode("ying", -11358)); pinyin.add(new PinyinCode("yo", -11340)); pinyin.add(new PinyinCode("yong", -11339)); pinyin.add(new PinyinCode("you", -11324)); pinyin.add(new PinyinCode("yu", -11303)); pinyin.add(new PinyinCode("yuan", -11097)); pinyin.add(new PinyinCode("yue", -11077)); pinyin.add(new PinyinCode("yun", -11067)); pinyin.add(new PinyinCode("za", -11055)); pinyin.add(new PinyinCode("zai", -11052)); pinyin.add(new PinyinCode("zan", -11045)); pinyin.add(new PinyinCode("zang", -11041)); pinyin.add(new PinyinCode("zao", -11038)); pinyin.add(new PinyinCode("ze", -11024)); pinyin.add(new PinyinCode("zei", -11020)); pinyin.add(new PinyinCode("zen", -11019)); pinyin.add(new PinyinCode("zeng", -11018)); pinyin.add(new PinyinCode("zha", -11014)); pinyin.add(new PinyinCode("zhai", -10838)); pinyin.add(new PinyinCode("zhan", -10832)); pinyin.add(new PinyinCode("zhang", -10815)); pinyin.add(new PinyinCode("zhao", -10800)); pinyin.add(new PinyinCode("zhe", -10790)); pinyin.add(new PinyinCode("zhen", -10780)); pinyin.add(new PinyinCode("zheng", -10764)); pinyin.add(new PinyinCode("zhi", -10587)); pinyin.add(new PinyinCode("zhong", -10544)); pinyin.add(new PinyinCode("zhou", -10533)); pinyin.add(new PinyinCode("zhu", -10519)); pinyin.add(new PinyinCode("zhua", -10331)); pinyin.add(new PinyinCode("zhuai", -10329)); pinyin.add(new PinyinCode("zhuan", -10328)); pinyin.add(new PinyinCode("zhuang", -10322)); pinyin.add(new PinyinCode("zhui", -10315)); pinyin.add(new PinyinCode("zhun", -10309)); pinyin.add(new PinyinCode("zhuo", -10307)); pinyin.add(new PinyinCode("zi", -10296)); pinyin.add(new PinyinCode("zong", -10281)); pinyin.add(new PinyinCode("zou", -10274)); pinyin.add(new PinyinCode("zu", -10270)); pinyin.add(new PinyinCode("zuan", -10262)); pinyin.add(new PinyinCode("zui", -10260)); pinyin.add(new PinyinCode("zun", -10256)); pinyin.add(new PinyinCode("zuo", -10254)); } }
发表评论
-
输入中文显示中文首字母
2012-04-25 22:34 1097import java.io.UnsupportedEncod ... -
PropertyUtils MethodUtils用法
2011-04-08 17:00 1584package rong.prop ... -
注解的定义
2011-01-02 13:09 10641.先定义一个自己的注解: package com.z ... -
java提供的几个基本的注解
2011-01-02 12:39 922package com.zchen.annotation ... -
利用BeanUtils工具类给JavaBean设置和取值
2011-01-02 12:23 2063import java.util.Date; pu ... -
利用内省方式对JavaBean的属性设置和取值
2011-01-02 11:47 984package com.zchen.bean; p ... -
利用反射机制将字符中的某个字符换成另一个字符
2011-01-02 09:38 873此例子:将字符为b的换成a: public class ... -
MD5
2011-01-01 21:50 1022package common.util.security ... -
自动装箱和拆箱
2011-01-01 18:00 840public static void main(Stri ... -
可变参数和for循环增强
2011-01-01 17:42 782public class VariableParamet ... -
静态导入
2011-01-01 17:32 801在jdk1.5中: 如果在程序中要用到静 ... -
用配置文件连接数据库
2011-01-01 13:10 10661.定义一个配置文件: conn_url=jdbc:m ... -
MySQL一次删除两张表
2010-12-14 20:02 6510今天遇到了同时删除两张表的问题,试了很多方法都没成功,如果在h ... -
UltraEdit15.10的注册码
2010-12-10 16:25 665找了很久在网上找到了一个有用的注册码,一来备份二来希望对别的朋 ... -
简单验证码的生成和使用
2010-12-10 10:20 778我们可以先定义一个servlet:因为我们要把生成都验证码保存 ...
相关推荐
Silverlight combobox,实现输入拼音显示对应的所有的汉字 具体描述请参考 http://blog.csdn.net/u010254787/article/details/29359703
1. 汉字拼音转换:系统需要能准确地将输入的拼音对应到正确的汉字。这通常依赖于拼音库,如GBK或Unicode中的拼音数据,以及高效的搜索算法。 2. 模糊匹配:考虑到用户可能会输入错误的拼音或省略声调,系统需要具备...
- 在iOS中,可以通过自定义方法遍历汉字拼音的每个字符,判断其是否为声母,如果是,则作为首字母返回。同时,考虑到中文姓氏的特殊性,例如"赵"、"郑"等复姓,需要额外处理。 3. **示例程序**: - 压缩包中的`...
- **拼音联想**:为了提高输入效率,虚拟键盘可能还包含拼音联想功能,自动显示与已输入拼音相符的汉字列表供用户选择。 4. **多语言支持** - **键盘布局**:对于不同国家的语言,键盘布局会有差异,比如英式键盘...
标题“vb全功能汉字转拼音”...总之,VB全功能汉字转拼音程序是一个高效、全面的工具,利用编程技术和汉字拼音数据库,为用户提供便捷的汉字转拼音服务。对于需要处理汉字拼音的用户而言,这是一个值得尝试的解决方案。
在JavaScript编程中,有时我们需要处理汉字与拼音之间的转换,例如在搜索、排序或者拼音输入法等场景。...希望本文所讲述的内容对你的JavaScript编程有所帮助,并激发你探索更多与汉字拼音处理相关的技术。
4. 绑定事件:在文本框控件的TextChanged或KeyPress事件中,调用转换函数,实时显示输入汉字的拼音。 5. 显示结果:将转换得到的拼音展示在另一个文本框或标签控件中,供用户查看。 需要注意的是,这个过程可能会...
这个工具可能通过解析Unicode码点,结合汉字拼音对照表来完成转换,然后在HTML页面上展示结果。这种技术在很多实际应用中都有广泛的应用,如搜索引擎优化、中文键盘输入等。理解并掌握这一技术对于JavaScript开发者...
#### 汉字拼音的作用 拼音是汉语普通话的音标系统,由声母、韵母和声调三部分组成。它不仅用于教学和学习汉字发音,还在输入法、语音识别、自然语言处理等领域发挥着重要作用。通过将汉字与拼音对应起来,可以实现...
汉字转拼音是计算机处理中文时的一项常见任务,它可以应用于各种场景,如语音输入、搜索优化、文本分析等。易语言通过内置的API或自定义模块,可以实现这一功能。下面我们将详细介绍如何在易语言中实现汉字转拼音。 ...
这个项目可能着重于优化输入效率,使得用户能通过简单的按键组合快速输入中文字符。 在标签中,"C"指的是C编程语言,这是一门广泛使用的系统级编程语言,以其简洁性和高效性闻名。"拼音"是指中文的拼音系统,是将...
在Unity引擎中,实现一个自定义的软键盘输入汉字拼音是一项技术挑战,它涉及到文本处理、用户交互以及可能的多语言支持。以下是一些相关的知识点: 1. **Unity引擎基础**:Unity是一款跨平台的游戏开发工具,支持2D...
- 输入法:输入拼音,显示可能的汉字候选。 - 教育软件:帮助学习者查找汉字的正确发音。 7. **调试与测试**: - 对于自动生成拼音的代码,需要覆盖各种情况,包括多音字、异体字以及罕见汉字的测试。 - 测试...
总的来说,"实用汉字转拼音软件"是一款集全面性、高效性和实用性于一体的工具,对于需要处理汉字拼音的个人和企业来说,它能极大地提高工作效率,降低语言处理的门槛,是中文信息处理领域不可或缺的助手。...
本知识点主要关注如何实现`AutoCompleteTextView`与汉字和拼音的关联,使得用户可以输入汉字或拼音进行查询。 首先,`AutoCompleteTextView` 是基于`EditText` 的扩展,提供了自动补全的功能。我们可以通过设置`...
在Java编程中,实现输入汉字拼音首字母自动显示出数据库中相应内容的功能,是常见的文本框自动补全(AutoComplete)技术的一种应用场景。这种技术通常用于提高用户输入的效率和准确性,常见于搜索引擎、输入法软件...
通过对给定文档内容的分析,我们可以看到全拼输入法在汉字拼音转换、常用短语及成语输入、特殊符号和地名输入等方面的应用。掌握这些知识点,可以帮助用户更高效地使用全拼输入法进行中文输入。
1. **中文输入法开发**:输入法软件通过查找拼音对照表,可以实现用户输入拼音时显示出相应的汉字候选。 2. **汉字转拼音**:在文本处理中,如果需要将汉字转换为拼音,可以利用这份表快速完成。 3. **拼音教学**:...
【汉字转拼音插件】是一种专门用于将汉字转换为拼音的工具,对于处理大量汉字文本、进行语音合成、搜索引擎优化(SEO)或者...同时,对于需要处理汉字拼音的教育、科研或商业应用,这款插件也是一个高效实用的工具。