网上查了一段中文转化为拼音的代码,用得是pinyin4j的JAR包,自己看看,自己也不会写。。。。就拿了这个JAR包改吧改吧用了,功能实现了。。。。。贴上代码。。。。。。。。。。。。。。。。。。。。。。。。。。
此外,由于city_hot的内容不能为null,都置为0,数据库中需要使用如下语句
update city_info set city_hot = 0;
JAR包下载地址如下:
http://download.csdn.net/detail/opzoonzhuzhengke/3929382
纯JAVA代码如下:
package com.zzk.cn;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import net.sourceforge.pinyin4j.PinyinHelper;
import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType;
import net.sourceforge.pinyin4j.format.HanyuPinyinOutputFormat;
import net.sourceforge.pinyin4j.format.HanyuPinyinToneType;
import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType;
import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination;
import java.io.*;
import java.sql.*;
import java.util.*;
public class CnToPy {
// 将汉字转换为全拼
public static String getPingYin(String src) {
char[] t1 = null;
t1 = src.toCharArray();
String[] t2 = new String[t1.length];
HanyuPinyinOutputFormat t3 = new HanyuPinyinOutputFormat();
t3.setCaseType(HanyuPinyinCaseType.LOWERCASE);
t3.setToneType(HanyuPinyinToneType.WITHOUT_TONE);
t3.setVCharType(HanyuPinyinVCharType.WITH_V);
String t4 = "";
int t0 = t1.length;
try {
for (int i = 0; i < t0; i++) {
// 判断是否为汉字字符
if (java.lang.Character.toString(t1[i]).matches(
"[\\u4E00-\\u9FA5]+")) {
t2 = PinyinHelper.toHanyuPinyinStringArray(t1[i], t3);
t4 += t2[0];
} else
t4 += java.lang.Character.toString(t1[i]);
}
// System.out.println(t4);
return t4;
} catch (BadHanyuPinyinOutputFormatCombination e1) {
e1.printStackTrace();
}
return t4;
}
// 返回中文的首字母
public static String getPinYinHeadChar(String str) {
String convert = "";
for (int j = 0; j < str.length(); j++) {
char word = str.charAt(j);
String[] pinyinArray = PinyinHelper.toHanyuPinyinStringArray(word);
if (pinyinArray != null) {
convert += pinyinArray[0].charAt(0);
} else {
convert += word;
}
}
return convert;
}
// 将字符串转移为ASCII码
public static String getCnASCII(String cnStr) {
StringBuffer strBuf = new StringBuffer();
byte[] bGBK = cnStr.getBytes();
for (int i = 0; i < bGBK.length; i++) {
// System.out.println(Integer.toHexString(bGBK[i]&0xff));
strBuf.append(Integer.toHexString(bGBK[i] & 0xff));
}
return strBuf.toString();
}
public static void main(String[] args) {
// String cnStr = "北京";
// System.out.println(getPingYin(cnStr));
// System.out.println(getPinYinHeadChar(cnStr));
Connection con = null;
PreparedStatement pstm = null;
FileReader fr = null;
BufferedReader br = null;
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection(
"jdbc:mysql://10.1.101.223:3306/weather", "appuser", "opzoon123!");
pstm = con
.prepareStatement("insert into city_info (city_id,city_name,city_pid,city_fname) values(?,?,?,?)");
fr = new FileReader("D://weather.txt");
br = new BufferedReader(fr);
String line = "";
while(null != (line = br.readLine())) {
{
line+=" "+getPingYin(line)+" "+getPinYinHeadChar(line);
}
//System.out.println(line);
//System.out.println(line+" "+getPingYin(line)+" "+getPinYinHeadChar(line));
StringTokenizer st = new StringTokenizer(line);
int ID = Integer.parseInt(st.nextToken());
String name = st.nextToken();
String s1=st.nextToken();
String PID=st.nextToken();
String s2=st.nextToken();
String fname=st.nextToken();
System.out.println(fname);
pstm.setInt(1, ID);
pstm.setString(2, name);
pstm.setString(3, PID);
pstm.setString(4, fname);
pstm.executeUpdate();
}
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}finally{
try {
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
pstm.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
con.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
使用完这段程序以后mysql中的数据改变为:
mysql> use weather;
Database changed
mysql> select * from city_info;
+-----+-----------+------------+---------------+------------+----------+
| id | city_id | city_name | city_pid | city_fname | city_hot |
+-----+-----------+------------+---------------+------------+----------+
| 1 | 10101 | 北京 | beijing | bj | 0 |
| 2 | 10102 | 上海 | shanghai | sh | 0 |
| 3 | 10103 | 天津 | tianjin | tj | 0 |
| 4 | 10104 | 重庆 | zhongqing | zq | 0 |
| 5 | 10105 | 黑龙江 | heilongjiang | hlj | 0 |
| 6 | 101050101 | 哈尔滨 | haerbin | heb | 0 |
| 7 | 101050201 | 齐齐哈尔 | qiqihaer | qqhe | 0 |
| 8 | 101050301 | 牡丹江 | mudanjiang | mdj | 0 |
| 9 | 101050401 | 佳木斯 | jiamusi | jms | 0 |
| 10 | 101050501 | 绥化 | suihua | sh | 0 |
| 11 | 101050601 | 黑河 | heihe | hh | 0 |
| 12 | 101050701 | 大兴安岭 | daxinganling | dxal | 0 |
| 13 | 101050801 | 伊春 | yichun | yc | 0 |
| 14 | 101050901 | 大庆 | daqing | dq | 0 |
| 15 | 101051002 | 七台河 | qitaihe | qth | 0 |
| 16 | 101051101 | 鸡西 | jixi | jx | 0 |
| 17 | 101051201 | 鹤岗 | hegang | hg | 0 |
| 18 | 101051301 | 双鸭山 | shuangyashan | sys | 0 |
| 19 | 10106 | 吉林 | jilin | jl | 0 |
| 20 | 101060101 | 长春 | zhangchun | zc | 0 |
| 21 | 101060201 | 吉林 | jilin | jl | 0 |
| 22 | 101060301 | 延吉 | yanji | yj | 0 |
| 23 | 101060401 | 四平 | siping | sp | 0 |
| 24 | 101060501 | 通化 | tonghua | th | 0 |
| 25 | 101060601 | 白城 | baicheng | bc | 0 |
| 26 | 101060701 | 辽源 | liaoyuan | ly | 0 |
| 27 | 101060801 | 松原 | songyuan | sy | 0 |
| 28 | 101060901 | 白山 | baishan | bs | 0 |
| 29 | 10107 | 辽宁 | liaoning | ln | 0 |
| 30 | 101070101 | 沈阳 | shenyang | sy | 0 |
| 31 | 101070201 | 大连 | dalian | dl | 0 |
| 32 | 101070301 | 鞍山 | anshan | as | 0 |
| 33 | 101070401 | 抚顺 | fushun | fs | 0 |
| 34 | 101070501 | 本溪 | benxi | bx | 0 |
| 35 | 101070601 | 丹东 | dandong | dd | 0 |
| 36 | 101070701 | 锦州 | jinzhou | jz | 0 |
| 37 | 101070801 | 营口 | yingkou | yk | 0 |
| 38 | 101070901 | 阜新 | fuxin | fx | 0 |
| 39 | 101071001 | 辽阳 | liaoyang | ly | 0 |
| 40 | 101071101 | 铁岭 | tieling | tl | 0 |
| 41 | 101071201 | 朝阳 | chaoyang | cy | 0 |
| 42 | 101071301 | 盘锦 | panjin | pj | 0 |
| 43 | 101071401 | 葫芦岛 | huludao | hld | 0 |
| 44 | 10108 | 内蒙古 | neimenggu | nmg | 0 |
| 45 | 101080101 | 呼和浩特 | huhehaote | hhht | 0 |
| 46 | 101080201 | 包头 | baotou | bt | 0 |
| 47 | 101080301 | 乌海 | wuhai | wh | 0 |
| 48 | 101080401 | 集宁 | jining | jn | 0 |
| 49 | 101080501 | 通辽 | tongliao | tl | 0 |
| 50 | 101080601 | 赤峰 | chifeng | cf | 0 |
| 51 | 101080701 | 鄂尔多斯 | eerduosi | eeds | 0 |
| 52 | 101080801 | 临河 | linhe | lh | 0 |
| 53 | 101080901 | 锡林浩特 | xilinhaote | xlht | 0 |
| 54 | 101081000 | 呼伦贝尔 | hulunbeier | hlbe | 0 |
| 55 | 101081001 | 海拉尔 | hailaer | hle | 0 |
| 56 | 101081010 | 满洲里 | manzhouli | mzl | 0 |
| 57 | 101081101 | 乌兰浩特 | wulanhaote | wlht | 0 |
| 58 | 101081201 | 阿拉善左旗 | alashanzuoqi | alszq | 0 |
| 59 | 10109 | 河北 | hebei | hb | 0 |
| 60 | 101090101 | 石家庄 | shijiazhuang | sjz | 0 |
| 61 | 101090201 | 保定 | baoding | bd | 0 |
| 62 | 101090301 | 张家口 | zhangjiakou | zjk | 0 |
| 63 | 101090402 | 承德 | chengde | cd | 0 |
| 64 | 101090501 | 唐山 | tangshan | ts | 0 |
| 65 | 101090601 | 廊坊 | langfang | lf | 0 |
| 66 | 101090701 | 沧州 | cangzhou | cz | 0 |
| 67 | 101090801 | 衡水 | hengshui | hs | 0 |
| 68 | 101090901 | 邢台 | xingtai | xt | 0 |
| 69 | 101091001 | 邯郸 | handan | hd | 0 |
| 70 | 101091101 | 秦皇岛 | qinhuangdao | qhd | 0 |
| 71 | 101091106 | 北戴河 | beidaihe | bdh | 0 |
| 72 | 10110 | 山西 | shanxi | sx | 0 |
| 73 | 101100101 | 太原 | taiyuan | ty | 0 |
| 74 | 101100201 | 大同 | datong | dt | 0 |
| 75 | 101100301 | 阳泉 | yangquan | yq | 0 |
| 76 | 101100401 | 晋中 | jinzhong | jz | 0 |
| 77 | 101100501 | 长治 | zhangzhi | zz | 0 |
| 78 | 101100601 | 晋城 | jincheng | jc | 0 |
| 79 | 101100701 | 临汾 | linfen | lf | 0 |
| 80 | 101100801 | 运城 | yuncheng | yc | 0 |
| 81 | 101100901 | 朔州 | shuozhou | sz | 0 |
| 82 | 101101001 | 忻州 | xinzhou | xz | 0 |
| 83 | 101101101 | 离石 | lishi | ls | 0 |
| 84 | 10111 | 陕西 | shanxi | sx | 0 |
| 85 | 101110101 | 西安 | xian | xa | 0 |
| 86 | 101110102 | 长安 | zhangan | za | 0 |
| 87 | 101110200 | 咸阳 | xianyang | xy | 0 |
| 88 | 101110201 | 三原 | sanyuan | sy | 0 |
| 89 | 101110300 | 延安 | yanan | ya | 0 |
| 90 | 101110401 | 榆林 | yulin | yl | 0 |
| 91 | 101110501 | 渭南 | weinan | wn | 0 |
| 92 | 101110601 | 商洛 | shangluo | sl | 0 |
| 93 | 101110701 | 安康 | ankang | ak | 0 |
| 94 | 101110801 | 汉中 | hanzhong | hz | 0 |
| 95 | 101110901 | 宝鸡 | baoji | bj | 0 |
| 96 | 101111001 | 铜川 | tongchuan | tc | 0 |
| 97 | 10112 | 山东 | shandong | sd | 0 |
| 98 | 101120101 | 济南 | jinan | jn | 0 |
| 99 | 101120201 | 青岛 | qingdao | qd | 0 |
| 100 | 101120301 | 淄博 | zibo | zb | 0 |
| 101 | 101120401 | 德州 | dezhou | dz | 0 |
| 102 | 101120501 | 烟台 | yantai | yt | 0 |
| 103 | 101120601 | 潍坊 | weifang | wf | 0 |
| 104 | 101120701 | 济宁 | jining | jn | 0 |
| 105 | 101120801 | 泰安 | taian | ta | 0 |
| 106 | 101120901 | 临沂 | linyi | ly | 0 |
| 107 | 101121001 | 菏泽 | heze | hz | 0 |
| 108 | 101121101 | 滨州 | binzhou | bz | 0 |
| 109 | 101121201 | 东营 | dongying | dy | 0 |
| 110 | 101121301 | 威海 | weihai | wh | 0 |
| 111 | 101121401 | 枣庄 | zaozhuang | zz | 0 |
| 112 | 101121501 | 日照 | rizhao | rz | 0 |
| 113 | 101121601 | 莱芜 | laiwu | lw | 0 |
| 114 | 101121701 | 聊城 | liaocheng | lc | 0 |
| 115 | 10113 | 新疆 | xinjiang | xj | 0 |
| 116 | 101130101 | 乌鲁木齐 | wulumuqi | wlmq | 0 |
| 117 | 101130201 | 克拉玛依 | kelamayi | klmy | 0 |
| 118 | 101130301 | 石河子 | shihezi | shz | 0 |
| 119 | 101130401 | 昌吉 | changji | cj | 0 |
| 120 | 101130501 | 吐鲁番 | tulufan | tlf | 0 |
| 121 | 101130601 | 库尔勒 | kuerle | kel | 0 |
| 122 | 101130701 | 阿拉尔 | alaer | ale | 0 |
| 123 | 101130801 | 阿克苏 | akesu | aks | 0 |
| 124 | 101130901 | 喀什 | kashen | ks | 0 |
| 125 | 101131001 | 伊宁 | yining | yn | 0 |
| 126 | 101131101 | 塔城 | tacheng | tc | 0 |
| 127 | 101131201 | 哈密 | hami | hm | 0 |
| 128 | 101131301 | 和田 | hetian | ht | 0 |
| 129 | 101131401 | 阿勒泰 | aletai | alt | 0 |
| 130 | 101131501 | 阿图什 | atushen | ats | 0 |
| 131 | 101131601 | 博乐 | bole | bl | 0 |
| 132 | 10114 | 西藏 | xizang | xz | 0 |
| 133 | 101140101 | 拉萨 | lasa | ls | 0 |
| 134 | 101140201 | 日喀则 | rikaze | rkz | 0 |
| 135 | 101140301 | 山南 | shannan | sn | 0 |
| 136 | 101140401 | 林芝 | linzhi | lz | 0 |
| 137 | 101140501 | 昌都 | changdou | cd | 0 |
| 138 | 101140601 | 那曲 | neiqu | nq | 0 |
| 139 | 101140701 | 阿里 | ali | al | 0 |
| 140 | 10115 | 青海 | qinghai | qh | 0 |
| 141 | 101150101 | 西宁 | xining | xn | 0 |
| 142 | 101150201 | 海东 | haidong | hd | 0 |
| 143 | 101150301 | 黄南 | huangnan | hn | 0 |
| 144 | 101150401 | 海南 | hainan | hn | 0 |
| 145 | 101150501 | 果洛 | guoluo | gl | 0 |
| 146 | 101150601 | 玉树 | yushu | ys | 0 |
| 147 | 101150701 | 海西 | haixi | hx | 0 |
| 148 | 101150801 | 海北 | haibei | hb | 0 |
| 149 | 10116 | 甘肃 | gansu | gs | 0 |
| 150 | 101160101 | 兰州 | lanzhou | lz | 0 |
| 151 | 101160201 | 定西 | dingxi | dx | 0 |
| 152 | 101160301 | 平凉 | pingliang | pl | 0 |
| 153 | 101160401 | 庆阳 | qingyang | qy | 0 |
| 154 | 101160501 | 武威 | wuwei | ww | 0 |
| 155 | 101160601 | 金昌 | jinchang | jc | 0 |
| 156 | 101160701 | 张掖 | zhangye | zy | 0 |
| 157 | 101160801 | 酒泉 | jiuquan | jq | 0 |
| 158 | 101160901 | 天水 | tianshui | ts | 0 |
| 159 | 101161001 | 武都 | wudou | wd | 0 |
| 160 | 101161101 | 临夏 | linxia | lx | 0 |
| 161 | 101161201 | 合作 | hezuo | hz | 0 |
| 162 | 101161301 | 白银 | baiyin | by | 0 |
| 163 | 10117 | 宁夏 | ningxia | nx | 0 |
| 164 | 101170101 | 银川 | yinchuan | yc | 0 |
| 165 | 101170201 | 石嘴山 | shizuishan | szs | 0 |
| 166 | 101170301 | 吴忠 | wuzhong | wz | 0 |
| 167 | 101170401 | 固原 | guyuan | gy | 0 |
| 168 | 101170501 | 中卫 | zhongwei | zw | 0 |
| 169 | 10118 | 河南 | henan | hn | 0 |
| 170 | 101180101 | 郑州 | zhengzhou | zz | 0 |
| 171 | 101180201 | 安阳 | anyang | ay | 0 |
| 172 | 101180301 | 新乡 | xinxiang | xx | 0 |
| 173 | 101180401 | 许昌 | xuchang | xc | 0 |
| 174 | 101180501 | 平顶山 | pingdingshan | pds | 0 |
| 175 | 101180601 | 信阳 | xinyang | xy | 0 |
| 176 | 101180701 | 南阳 | nanyang | ny | 0 |
| 177 | 101180801 | 开封 | kaifeng | kf | 0 |
| 178 | 101180901 | 洛阳 | luoyang | ly | 0 |
| 179 | 101181001 | 商丘 | shangqiu | sq | 0 |
| 180 | 101181101 | 焦作 | jiaozuo | jz | 0 |
| 181 | 101181201 | 鹤壁 | hebi | hb | 0 |
| 182 | 101181301 | 濮阳 | puyang | py | 0 |
| 183 | 101181401 | 周口 | zhoukou | zk | 0 |
| 184 | 101181501 | 漯河 | luohe | lh | 0 |
| 185 | 101181601 | 驻马店 | zhumadian | zmd | 0 |
| 186 | 101181701 | 三门峡 | sanmenxia | smx | 0 |
| 187 | 101181801 | 济源 | jiyuan | jy | 0 |
| 188 | 10119 | 江苏 | jiangsu | js | 0 |
| 189 | 101190101 | 南京 | nanjing | nj | 0 |
| 190 | 101190201 | 无锡 | wuxi | wx | 0 |
| 191 | 101190301 | 镇江 | zhenjiang | zj | 0 |
| 192 | 101190401 | 苏州 | suzhou | sz | 0 |
| 193 | 101190501 | 南通 | nantong | nt | 0 |
| 194 | 101190601 | 扬州 | yangzhou | yz | 0 |
| 195 | 101190701 | 盐城 | yancheng | yc | 0 |
| 196 | 101190801 | 徐州 | xuzhou | xz | 0 |
| 197 | 101190901 | 淮安 | huaian | ha | 0 |
| 198 | 101191001 | 连云港 | lianyungang | lyg | 0 |
| 199 | 101191101 | 常州 | changzhou | cz | 0 |
| 200 | 101191201 | 泰州 | taizhou | tz | 0 |
| 201 | 101191301 | 宿迁 | suqian | sq | 0 |
| 202 | 10120 | 湖北 | hubei | hb | 0 |
| 203 | 101200101 | 武汉 | wuhan | wh | 0 |
| 204 | 101200201 | 襄樊 | xiangfan | xf | 0 |
| 205 | 101200301 | 鄂州 | ezhou | ez | 0 |
| 206 | 101200401 | 孝感 | xiaogan | xg | 0 |
| 207 | 101200501 | 黄冈 | huanggang | hg | 0 |
| 208 | 101200601 | 黄石 | huangshi | hs | 0 |
| 209 | 101200701 | 咸宁 | xianning | xn | 0 |
| 210 | 101200801 | 荆州 | jingzhou | jz | 0 |
| 211 | 101200901 | 宜昌 | yichang | yc | 0 |
| 212 | 101201001 | 恩施 | enshi | es | 0 |
| 213 | 101201101 | 十堰 | shiyan | sy | 0 |
| 214 | 101201201 | 神农架 | shennongjia | snj | 0 |
| 215 | 101201301 | 随州 | suizhou | sz | 0 |
| 216 | 101201401 | 荆门 | jingmen | jm | 0 |
| 217 | 101201501 | 天门 | tianmen | tm | 0 |
| 218 | 101201601 | 仙桃 | xiantao | xt | 0 |
| 219 | 101201701 | 潜江 | qianjiang | qj | 0 |
| 220 | 10121 | 浙江 | zhejiang | zj | 0 |
| 221 | 101210101 | 杭州 | hangzhou | hz | 0 |
| 222 | 101210201 | 湖州 | huzhou | hz | 0 |
| 223 | 101210301 | 嘉兴 | jiaxing | jx | 0 |
| 224 | 101210401 | 宁波 | ningbo | nb | 0 |
| 225 | 101210501 | 绍兴 | shaoxing | sx | 0 |
| 226 | 101210601 | 台州 | taizhou | tz | 0 |
| 227 | 101210701 | 温州 | wenzhou | wz | 0 |
| 228 | 101210801 | 丽水 | lishui | ls | 0 |
| 229 | 101210901 | 金华 | jinhua | jh | 0 |
| 230 | 101211001 | 衢州 | quzhou | qz | 0 |
| 231 | 101211101 | 舟山 | zhoushan | zs | 0 |
| 232 | 10122 | 安徽 | anhui | ah | 0 |
| 233 | 101220101 | 合肥 | hefei | hf | 0 |
| 234 | 101220201 | 蚌埠 | bangbu | bb | 0 |
| 235 | 101220301 | 芜湖 | wuhu | wh | 0 |
| 236 | 101220401 | 淮南 | huainan | hn | 0 |
| 237 | 101220501 | 马鞍山 | maanshan | mas | 0 |
| 238 | 101220601 | 安庆 | anqing | aq | 0 |
| 239 | 101220701 | 宿州 | suzhou | sz | 0 |
| 240 | 101220801 | 阜阳 | fuyang | fy | 0 |
| 241 | 101220901 | 亳州 | bozhou | bz | 0 |
| 242 | 101221001 | 黄山站 | huangshanzhan | hsz | 0 |
| 243 | 101221101 | 滁州 | chuzhou | cz | 0 |
| 244 | 101221201 | 淮北 | huaibei | hb | 0 |
| 245 | 101221301 | 铜陵 | tongling | tl | 0 |
| 246 | 101221401 | 宣城 | xuancheng | xc | 0 |
| 247 | 101221501 | 六安 | liuan | la | 0 |
| 248 | 101221601 | 巢湖 | chaohu | ch | 0 |
| 249 | 101221701 | 池州 | chizhou | cz | 0 |
| 250 | 10123 | 福建 | fujian | fj | 0 |
| 251 | 101230101 | 福州 | fuzhou | fz | 0 |
| 252 | 101230201 | 厦门 | shamen | sm | 0 |
| 253 | 101230301 | 宁德 | ningde | nd | 0 |
| 254 | 101230401 | 莆田 | putian | pt | 0 |
| 255 | 101230501 | 泉州 | quanzhou | qz | 0 |
| 256 | 101230601 | 漳州 | zhangzhou | zz | 0 |
| 257 | 101230701 | 龙岩 | longyan | ly | 0 |
| 258 | 101230801 | 三明 | sanming | sm | 0 |
| 259 | 101230901 | 南平 | nanping | np | 0 |
| 260 | 10124 | 江西 | jiangxi | jx | 0 |
| 261 | 101240101 | 南昌 | nanchang | nc | 0 |
| 262 | 101240201 | 九江 | jiujiang | jj | 0 |
| 263 | 101240301 | 上饶 | shangrao | sr | 0 |
| 264 | 101240401 | 抚州 | fuzhou | fz | 0 |
| 265 | 101240501 | 宜春 | yichun | yc | 0 |
| 266 | 101240601 | 吉安 | jian | ja | 0 |
| 267 | 101240701 | 赣州 | ganzhou | gz | 0 |
| 268 | 101240801 | 景德镇 | jingdezhen | jdz | 0 |
| 269 | 101240901 | 萍乡 | pingxiang | px | 0 |
| 270 | 101241001 | 新余 | xinyu | xy | 0 |
| 271 | 101241101 | 鹰潭 | yingtan | yt | 0 |
| 272 | 10125 | 湖南 | hunan | hn | 0 |
| 273 | 101250101 | 长沙 | zhangsha | zs | 0 |
| 274 | 101250201 | 湘潭 | xiangtan | xt | 0 |
| 275 | 101250301 | 株洲 | zhuzhou | zz | 0 |
| 276 | 101250401 | 衡阳 | hengyang | hy | 0 |
| 277 | 101250501 | 郴州 | chenzhou | cz | 0 |
| 278 | 101250601 | 常德 | changde | cd | 0 |
| 279 | 101250701 | 赫山区 | heshanqu | hsq | 0 |
| 280 | 101250801 | 娄底 | loudi | ld | 0 |
| 281 | 101250901 | 邵阳 | shaoyang | sy | 0 |
| 282 | 101251001 | 岳阳 | yueyang | yy | 0 |
| 283 | 101251101 | 张家界 | zhangjiajie | zjj | 0 |
| 284 | 101251201 | 怀化 | huaihua | hh | 0 |
| 285 | 101251301 | 黔阳 | qianyang | qy | 0 |
| 286 | 101251401 | 永州 | yongzhou | yz | 0 |
| 287 | 101251501 | 吉首 | jishou | js | 0 |
| 288 | 10126 | 贵州 | guizhou | gz | 0 |
| 289 | 101260101 | 贵阳 | guiyang | gy | 0 |
| 290 | 101260201 | 遵义 | zunyi | zy | 0 |
| 291 | 101260301 | 安顺 | anshun | as | 0 |
| 292 | 101260401 | 都匀 | douyun | dy | 0 |
| 293 | 101260501 | 凯里 | kaili | kl | 0 |
| 294 | 101260601 | 铜仁 | tongren | tr | 0 |
| 295 | 101260701 | 毕节 | bijie | bj | 0 |
| 296 | 101260801 | 六盘水 | liupanshui | lps | 0 |
| 297 | 101260901 | 黔西 | qianxi | qx | 0 |
| 298 | 10127 | 四川 | sichuan | sc | 0 |
| 299 | 101270101 | 成都 | chengdou | cd | 0 |
| 300 | 101270201 | 攀枝花 | panzhihua | pzh | 0 |
| 301 | 101270301 | 自贡 | zigong | zg | 0 |
| 302 | 101270401 | 绵阳 | mianyang | my | 0 |
| 303 | 101270501 | 南充 | nanchong | nc | 0 |
| 304 | 101270601 | 达州 | dazhou | dz | 0 |
| 305 | 101270701 | 遂宁 | suining | sn | 0 |
| 306 | 101270801 | 广安 | guangan | ga | 0 |
| 307 | 101270901 | 巴中 | bazhong | bz | 0 |
| 308 | 101271001 | 泸州 | luzhou | lz | 0 |
| 309 | 101271101 | 宜宾 | yibin | yb | 0 |
| 310 | 101271201 | 内江 | neijiang | nj | 0 |
| 311 | 101271301 | 资阳 | ziyang | zy | 0 |
| 312 | 101271401 | 乐山 | leshan | ls | 0 |
| 313 | 101271501 | 眉山 | meishan | ms | 0 |
| 314 | 101271601 | 凉山 | liangshan | ls | 0 |
| 315 | 101271701 | 雅安 | yaan | ya | 0 |
| 316 | 101271801 | 甘孜 | ganzi | gz | 0 |
| 317 | 101271901 | 阿坝 | aba | ab | 0 |
| 318 | 101272001 | 德阳 | deyang | dy | 0 |
| 319 | 101272101 | 广元 | guangyuan | gy | 0 |
| 320 | 10128 | 广东 | guangdong | gd | 0 |
| 321 | 101280101 | 广州 | guangzhou | gz | 0 |
| 322 | 101280201 | 韶关 | shaoguan | sg | 0 |
| 323 | 101280301 | 惠州 | huizhou | hz | 0 |
| 324 | 101280401 | 梅州 | meizhou | mz | 0 |
| 325 | 101280501 | 汕头 | shantou | st | 0 |
| 326 | 101280601 | 深圳 | shenzhen | sz | 0 |
| 327 | 101280701 | 珠海 | zhuhai | zh | 0 |
| 328 | 101280800 | 佛山 | foshan | fs | 0 |
| 329 | 101280801 | 顺德 | shunde | sd | 0 |
| 330 | 101280901 | 肇庆 | zhaoqing | zq | 0 |
| 331 | 101281001 | 湛江 | zhanjiang | zj | 0 |
| 332 | 101281101 | 江门 | jiangmen | jm | 0 |
| 333 | 101281201 | 河源 | heyuan | hy | 0 |
| 334 | 101281301 | 清远 | qingyuan | qy | 0 |
| 335 | 101281401 | 云浮 | yunfu | yf | 0 |
| 336 | 101281501 | 潮州 | chaozhou | cz | 0 |
| 337 | 101281601 | 东莞 | dongguan | dg | 0 |
| 338 | 101281701 | 中山 | zhongshan | zs | 0 |
| 339 | 101281801 | 阳江 | yangjiang | yj | 0 |
| 340 | 101281901 | 揭阳 | jieyang | jy | 0 |
| 341 | 101282001 | 茂名 | maoming | mm | 0 |
| 342 | 101282101 | 汕尾 | shanwei | sw | 0 |
| 343 | 10129 | 云南 | yunnan | yn | 0 |
| 344 | 101290101 | 昆明 | kunming | km | 0 |
| 345 | 101290201 | 大理 | dali | dl | 0 |
| 346 | 101290301 | 红河 | honghe | hh | 0 |
| 347 | 101290401 | 曲靖 | qujing | qj | 0 |
| 348 | 101290501 | 保山 | baoshan | bs | 0 |
| 349 | 101290601 | 文山 | wenshan | ws | 0 |
| 350 | 101290701 | 玉溪 | yuxi | yx | 0 |
| 351 | 101290801 | 楚雄 | chuxiong | cx | 0 |
| 352 | 101290901 | 普洱 | puer | pe | 0 |
| 353 | 101291001 | 昭通 | zhaotong | zt | 0 |
| 354 | 101291101 | 临沧 | lincang | lc | 0 |
| 355 | 101291201 | 怒江 | nujiang | nj | 0 |
| 356 | 101291301 | 香格里拉 | xianggelila | xgll | 0 |
| 357 | 101291401 | 丽江 | lijiang | lj | 0 |
| 358 | 101291501 | 德宏 | dehong | dh | 0 |
| 359 | 101291601 | 景洪 | jinghong | jh | 0 |
| 360 | 10130 | 广西 | guangxi | gx | 0 |
| 361 | 101300101 | 南宁 | nanning | nn | 0 |
| 362 | 101300201 | 崇左 | chongzuo | cz | 0 |
| 363 | 101300301 | 柳州 | liuzhou | lz | 0 |
| 364 | 101300401 | 来宾 | laibin | lb | 0 |
| 365 | 101300501 | 桂林 | guilin | gl | 0 |
| 366 | 101300601 | 梧州 | wuzhou | wz | 0 |
| 367 | 101300701 | 贺州 | hezhou | hz | 0 |
| 368 | 101300801 | 贵港 | guigang | gg | 0 |
| 369 | 101300901 | 玉林 | yulin | yl | 0 |
| 370 | 101301001 | 百色 | baise | bs | 0 |
| 371 | 101301101 | 钦州 | qinzhou | qz | 0 |
| 372 | 101301201 | 河池 | hechi | hc | 0 |
| 373 | 101301301 | 北海 | beihai | bh | 0 |
| 374 | 101301401 | 防城港 | fangchenggang | fcg | 0 |
| 375 | 10131 | 海南 | hainan | hn | 0 |
| 376 | 101310101 | 海口 | haikou | hk | 0 |
| 377 | 101310201 | 三亚 | sanya | sy | 0 |
| 378 | 101310202 | 东方 | dongfang | df | 0 |
| 379 | 101310203 | 临高 | lingao | lg | 0 |
| 380 | 101310204 | 澄迈 | chengmai | cm | 0 |
| 381 | 101310205 | 儋州 | danzhou | dz | 0 |
| 382 | 101310206 | 昌江 | changjiang | cj | 0 |
| 383 | 101310207 | 白沙 | baisha | bs | 0 |
| 384 | 101310208 | 琼中 | qiongzhong | qz | 0 |
| 385 | 101310209 | 定安 | dingan | da | 0 |
| 386 | 101310210 | 屯昌 | tunchang | tc | 0 |
| 387 | 101310211 | 琼海 | qionghai | qh | 0 |
| 388 | 101310212 | 文昌 | wenchang | wc | 0 |
| 389 | 101310213 | 清兰 | qinglan | ql | 0 |
| 390 | 101310214 | 保亭 | baoting | bt | 0 |
| 391 | 101310215 | 万宁 | wanning | wn | 0 |
| 392 | 101310216 | 陵水 | lingshui | ls | 0 |
| 393 | 101310217 | 西沙 | xisha | xs | 0 |
| 394 | 101310218 | 珊瑚岛 | shanhudao | shd | 0 |
| 395 | 101310219 | 永署礁 | yongshujiao | ysj | 0 |
| 396 | 101310220 | 南沙岛 | nanshadao | nsd | 0 |
| 397 | 101310221 | 乐东 | ledong | ld | 0 |
| 398 | 101310222 | 五指山 | wuzhishan | wzs | 0 |
| 399 | 101310223 | 通什 | tongshen | ts | 0 |
| 400 | 101320101 | 香港 | xianggang | xg | 0 |
| 401 | 101330101 | 澳门 | aomen | am | 0 |
| 402 | 10134 | 台湾 | taiwan | tw | 0 |
| 403 | 101340101 | 台北县 | taibeixian | tbx | 0 |
| 404 | 101340102 | 台北市 | taibeishi | tbs | 0 |
| 405 | 101340201 | 高雄 | gaoxiong | gx | 0 |
| 406 | 101340202 | 东港 | donggang | dg | 0 |
| 407 | 101340203 | 大武 | dawu | dw | 0 |
| 408 | 101340204 | 恒春 | hengchun | hc | 0 |
| 409 | 101340205 | 兰屿 | lanyu | ly | 0 |
| 410 | 101340301 | 台南 | tainan | tn | 0 |
| 411 | 101340401 | 台中 | taizhong | tz | 0 |
| 412 | 101340501 | 桃园 | taoyuan | ty | 0 |
| 413 | 101340601 | 新竹县 | xinzhuxian | xzx | 0 |
| 414 | 101340602 | 新竹市 | xinzhushi | xzs | 0 |
| 415 | 101340603 | 公馆 | gongguan | gg | 0 |
| 416 | 101340701 | 宜兰 | yilan | yl | 0 |
| 417 | 101340801 | 马公 | magong | mg | 0 |
| 418 | 101340802 | 东吉屿 | dongjiyu | djy | 0 |
| 419 | 101340901 | 嘉义 | jiayi | jy | 0 |
| 420 | 101340902 | 阿里山 | alishan | als | 0 |
| 421 | 101340903 | 玉山 | yushan | ys | 0 |
| 422 | 101340904 | 新港 | xingang | xg | 0 |
+-----+-----------+------------+---------------+------------+----------+
422 rows in set
mysql>