| 1 | |
package jp.co.y_net.amm.common; |
| 2 | |
|
| 3 | |
import java.io.UnsupportedEncodingException; |
| 4 | |
import java.util.HashMap; |
| 5 | |
import java.util.Iterator; |
| 6 | |
import java.util.Map; |
| 7 | |
|
| 8 | |
import org.apache.wicket.model.Model; |
| 9 | |
|
| 10 | |
|
| 11 | 0 | public class AppStringUtils { |
| 12 | |
|
| 13 | |
public static String trim(String src) { |
| 14 | 0 | if(src == null) return ""; |
| 15 | 0 | return src.trim(); |
| 16 | |
} |
| 17 | |
public static String trim(Model<ChoiceElement> ceModel) { |
| 18 | 0 | if(ceModel == null) return ""; |
| 19 | 0 | if(ceModel.getObject() == null) return ""; |
| 20 | 0 | return trim(ceModel.getObject().getId()); |
| 21 | |
} |
| 22 | |
public static String trimHalf(String str) { |
| 23 | 0 | return convZenkakuToHankaku(trim(str)); |
| 24 | |
} |
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
|
| 34 | |
|
| 35 | |
|
| 36 | |
|
| 37 | |
|
| 38 | |
|
| 39 | 0 | private static final String kanaHanZenTbl[][] = { |
| 40 | |
|
| 41 | |
|
| 42 | 0 | { "ガ", "ガ" }, { "ギ", "ギ" }, { "グ", "グ" }, { "ゲ", "ゲ" }, { "ゴ", "ゴ" }, |
| 43 | 0 | { "ザ", "ザ" }, { "ジ", "ジ" }, { "ズ", "ズ" }, { "ゼ", "ゼ" }, { "ゾ", "ゾ" }, |
| 44 | 0 | { "ダ", "ダ" }, { "ヂ", "ヂ" }, { "ヅ", "ヅ" }, { "デ", "デ" }, { "ド", "ド" }, |
| 45 | 0 | { "バ", "バ" }, { "ビ", "ビ" }, { "ブ", "ブ" }, { "ベ", "ベ" }, { "ボ", "ボ" }, |
| 46 | 0 | { "パ", "パ" }, { "ピ", "ピ" }, { "プ", "プ" }, { "ペ", "ペ" }, { "ポ", "ポ" }, |
| 47 | 0 | { "ヴ", "ヴ" }, |
| 48 | |
|
| 49 | 0 | { "ア", "ア" }, { "イ", "イ" }, { "ウ", "ウ" }, { "エ", "エ" }, { "オ", "オ" }, |
| 50 | 0 | { "カ", "カ" }, { "キ", "キ" }, { "ク", "ク" }, { "ケ", "ケ" }, { "コ", "コ" }, |
| 51 | 0 | { "サ", "サ" }, { "シ", "シ" }, { "ス", "ス" }, { "セ", "セ" }, { "ソ", "ソ" }, |
| 52 | 0 | { "タ", "タ" }, { "チ", "チ" }, { "ツ", "ツ" }, { "テ", "テ" }, { "ト", "ト" }, |
| 53 | 0 | { "ナ", "ナ" }, { "ニ", "ニ" }, { "ヌ", "ヌ" }, { "ネ", "ネ" }, { "ノ", "ノ" }, |
| 54 | 0 | { "ハ", "ハ" }, { "ヒ", "ヒ" }, { "フ", "フ" }, { "ヘ", "ヘ" }, { "ホ", "ホ" }, |
| 55 | 0 | { "マ", "マ" }, { "ミ", "ミ" }, { "ム", "ム" }, { "メ", "メ" }, { "モ", "モ" }, |
| 56 | 0 | { "ヤ", "ヤ" }, { "ユ", "ユ" }, { "ヨ", "ヨ" }, |
| 57 | 0 | { "ラ", "ラ" }, { "リ", "リ" }, { "ル", "ル" }, { "レ", "レ" }, { "ロ", "ロ" }, |
| 58 | 0 | { "ワ", "ワ" }, { "ヲ", "ヲ" }, { "ン", "ン" }, |
| 59 | 0 | { "ァ", "ァ" }, { "ィ", "ィ" }, { "ゥ", "ゥ" }, { "ェ", "ェ" }, { "ォ", "ォ" }, |
| 60 | 0 | { "ャ", "ャ" }, { "ュ", "ュ" }, { "ョ", "ョ" }, { "ッ", "ッ" }, |
| 61 | 0 | { "。", "。" }, { "「", "「" }, { "」", "」" }, { "、", "、" }, { "・", "・" }, |
| 62 | 0 | { "ー", "ー" }, { "", "" } |
| 63 | 0 | }; |
| 64 | |
|
| 65 | |
|
| 66 | |
|
| 67 | |
|
| 68 | |
|
| 69 | |
|
| 70 | |
public static String convZenkakuToHankaku(String s){ |
| 71 | |
String convStr; |
| 72 | |
|
| 73 | |
|
| 74 | 0 | convStr = convZenkakuLatinCharToHankakuLatinChar(s); |
| 75 | |
|
| 76 | |
|
| 77 | 0 | convStr = convZenkakuKatakanaToHankakuKatakana(convStr); |
| 78 | |
|
| 79 | 0 | return convStr; |
| 80 | |
} |
| 81 | |
|
| 82 | |
|
| 83 | |
|
| 84 | |
|
| 85 | |
|
| 86 | |
|
| 87 | |
|
| 88 | |
|
| 89 | |
public static String convZenkakuLatinCharToHankakuLatinChar(String s){ |
| 90 | 0 | String str = ""; |
| 91 | |
|
| 92 | |
|
| 93 | 0 | for (int i = 0; i < s.length(); i++) { |
| 94 | |
|
| 95 | 0 | Character c = new Character(s.substring(i, i + 1).charAt(0)); |
| 96 | |
|
| 97 | |
|
| 98 | 0 | if (c.compareTo(new Character((char)0xff01)) >= 0 && c.compareTo(new Character((char)0xff5e)) <= 0) { |
| 99 | |
|
| 100 | 0 | Character x = new Character((char) (c.charValue() - (new Character((char)0xfee0)).charValue())); |
| 101 | |
|
| 102 | |
|
| 103 | 0 | str = str + x.toString(); |
| 104 | 0 | } else { |
| 105 | |
|
| 106 | 0 | str = str + s.substring(i, i + 1); |
| 107 | |
} |
| 108 | |
} |
| 109 | |
|
| 110 | |
|
| 111 | 0 | return str; |
| 112 | |
} |
| 113 | |
|
| 114 | |
|
| 115 | |
|
| 116 | |
|
| 117 | |
|
| 118 | |
|
| 119 | |
public static String convZenkakuKatakanaToHankakuKatakana(String s) { |
| 120 | 0 | String str = ""; |
| 121 | |
|
| 122 | |
|
| 123 | 0 | for (int i = 0, j = 0; i < s.length(); i++) { |
| 124 | |
|
| 125 | 0 | Character c = new Character(s.substring(i, i + 1).charAt(0)); |
| 126 | |
|
| 127 | |
|
| 128 | 0 | if (c.compareTo(new Character((char)0x30a1)) >= 0 && c.compareTo(new Character((char)0x30fc)) <= 0) { |
| 129 | |
|
| 130 | 0 | for (j = 0; j < kanaHanZenTbl.length; j++) { |
| 131 | 0 | if (s.substring(i).startsWith(kanaHanZenTbl[j][1])) { |
| 132 | 0 | str = str + kanaHanZenTbl[j][0]; |
| 133 | 0 | break; |
| 134 | |
} |
| 135 | |
} |
| 136 | |
|
| 137 | |
|
| 138 | 0 | if (j >= kanaHanZenTbl.length) { |
| 139 | 0 | str = str + s.substring(i, i + 1); |
| 140 | |
} |
| 141 | 0 | } else { |
| 142 | |
|
| 143 | 0 | str = str + s.substring(i, i + 1); |
| 144 | |
} |
| 145 | |
} |
| 146 | |
|
| 147 | |
|
| 148 | 0 | return str; |
| 149 | |
} |
| 150 | |
|
| 151 | |
|
| 152 | |
|
| 153 | |
|
| 154 | |
|
| 155 | |
public static String utf8ToSjis(String value) { |
| 156 | |
try { |
| 157 | |
|
| 158 | 0 | if(value != null) { |
| 159 | 0 | StringBuffer sb = new StringBuffer(); |
| 160 | 0 | for(char c: value.toCharArray()) { |
| 161 | 0 | sb.append(unicodeToSjis(Character.toString(c))); |
| 162 | |
} |
| 163 | 0 | value = sb.toString(); |
| 164 | |
} |
| 165 | 0 | boolean[] boolAry = new boolean[value.length()]; |
| 166 | 0 | byte[] srcStream = value.getBytes("UTF-8"); |
| 167 | 0 | value = convert(new String(srcStream, "UTF-8"), "UTF-8", "SJIS"); |
| 168 | 0 | boolAry = getQuePos(boolAry,value); |
| 169 | 0 | byte[] destStream = value.getBytes("SJIS"); |
| 170 | 0 | value = new String(destStream, "SJIS"); |
| 171 | 0 | value = convertGeta(value,boolAry); |
| 172 | 0 | return value; |
| 173 | 0 | } catch (UnsupportedEncodingException e) { |
| 174 | 0 | throw new RuntimeException(e); |
| 175 | |
} |
| 176 | |
} |
| 177 | |
|
| 178 | |
|
| 179 | |
|
| 180 | |
|
| 181 | |
|
| 182 | |
|
| 183 | |
private static boolean[] getQuePos(boolean[] boolAry, String value) { |
| 184 | 0 | for (int i = 0; i < value.length(); i++) { |
| 185 | 0 | if (value.substring(i, i + 1).equals("?")) { |
| 186 | 0 | boolAry[i] = true; |
| 187 | 0 | } else { |
| 188 | 0 | boolAry[i] = false; |
| 189 | |
} |
| 190 | |
} |
| 191 | 0 | return boolAry; |
| 192 | |
} |
| 193 | |
|
| 194 | |
|
| 195 | |
|
| 196 | |
|
| 197 | |
|
| 198 | |
|
| 199 | |
|
| 200 | |
private static String convertGeta(String value, boolean[] bAry) { |
| 201 | 0 | String newVal = ""; |
| 202 | 0 | String c = ""; |
| 203 | 0 | for (int i = 0; i < value.length(); i++) { |
| 204 | 0 | c = value.substring(i, i + 1); |
| 205 | 0 | if (bAry[i] == false) { |
| 206 | 0 | if (c.equals("?")) { |
| 207 | 0 | c = "〓"; |
| 208 | |
} |
| 209 | |
} |
| 210 | 0 | newVal = newVal + c; |
| 211 | |
} |
| 212 | 0 | return newVal; |
| 213 | |
} |
| 214 | |
|
| 215 | |
|
| 216 | |
|
| 217 | |
|
| 218 | |
|
| 219 | |
|
| 220 | |
|
| 221 | |
|
| 222 | |
private static String convert(String value, String src, String dest) { |
| 223 | 0 | Map<String, String> conversion = createConversionMap(src, dest); |
| 224 | |
char oldChar; |
| 225 | |
char newChar; |
| 226 | |
String key; |
| 227 | 0 | for (Iterator<String> itr = conversion.keySet().iterator(); itr.hasNext();) { |
| 228 | 0 | key = itr.next(); |
| 229 | 0 | oldChar = toChar(key); |
| 230 | 0 | newChar = toChar(conversion.get(key)); |
| 231 | 0 | value = value.replace(oldChar, newChar); |
| 232 | |
} |
| 233 | 0 | return value; |
| 234 | |
} |
| 235 | |
|
| 236 | |
|
| 237 | |
|
| 238 | |
|
| 239 | |
|
| 240 | |
|
| 241 | |
|
| 242 | |
private static Map<String, String> createConversionMap(String src, String dest) { |
| 243 | 0 | Map<String, String> conversion = new HashMap<String, String>(); |
| 244 | 0 | if ((src.equals("UTF-8")) && (dest.equals("SJIS"))) { |
| 245 | |
|
| 246 | 0 | conversion.put("U+FF0D", "U+2212"); |
| 247 | |
|
| 248 | 0 | conversion.put("U+FF5E", "U+301C"); |
| 249 | |
|
| 250 | 0 | conversion.put("U+FFE0", "U+00A2"); |
| 251 | |
|
| 252 | 0 | conversion.put("U+FFE1", "U+00A3"); |
| 253 | |
|
| 254 | 0 | conversion.put("U+FFE2", "U+00AC"); |
| 255 | |
|
| 256 | 0 | conversion.put("U+2015", "U+2014"); |
| 257 | |
|
| 258 | 0 | conversion.put("U+2225", "U+2016"); |
| 259 | |
|
| 260 | 0 | } else if ((src.equals("SJIS")) && (dest.equals("UTF-8"))) { |
| 261 | |
|
| 262 | 0 | conversion.put("U+2212", "U+FF0D"); |
| 263 | |
|
| 264 | 0 | conversion.put("U+301C", "U+FF5E"); |
| 265 | |
|
| 266 | 0 | conversion.put("U+00A2", "U+FFE0"); |
| 267 | |
|
| 268 | 0 | conversion.put("U+00A3", "U+FFE1"); |
| 269 | |
|
| 270 | 0 | conversion.put("U+00AC", "U+FFE2"); |
| 271 | |
|
| 272 | 0 | conversion.put("U+2014", "U+2015"); |
| 273 | |
|
| 274 | 0 | conversion.put("U+2016", "U+2225"); |
| 275 | |
|
| 276 | 0 | } else { |
| 277 | 0 | throw new RuntimeException("この文字コードはサポートしていません。\n・src=" + src + ",dest=" + dest); |
| 278 | |
} |
| 279 | 0 | return conversion; |
| 280 | |
} |
| 281 | |
|
| 282 | |
|
| 283 | |
|
| 284 | |
|
| 285 | |
|
| 286 | |
|
| 287 | |
|
| 288 | |
private static char toChar(String value) { |
| 289 | 0 | return (char) Integer.parseInt(value.trim().substring("U+".length()), 16); |
| 290 | |
} |
| 291 | |
|
| 292 | |
|
| 293 | |
|
| 294 | |
public static String unicodeToSjis(String value) { |
| 295 | 0 | if(value == null || value.length() != 1) { |
| 296 | 0 | return value; |
| 297 | |
} |
| 298 | |
char decodeStr; |
| 299 | |
|
| 300 | 0 | int code = (int)value.charAt(0); |
| 301 | 0 | String hex = Integer.toHexString(code); |
| 302 | 0 | hex = "u" + hex.toUpperCase(); |
| 303 | |
|
| 304 | 0 | if (hex.equals("u3299")==true) { decodeStr = Character.valueOf('\u79D8');} |
| 305 | 0 | else if (hex.equals("u4EFD")==true) { decodeStr = Character.valueOf('\u5F6C');} |
| 306 | 0 | else if (hex.equals("u4FE0")==true) { decodeStr = Character.valueOf('\u4FA0');} |
| 307 | 0 | else if (hex.equals("u4FE0")==true) { decodeStr = Character.valueOf('\u4FA0');} |
| 308 | 0 | else if (hex.equals("u501C")==true) { decodeStr = Character.valueOf('\u4FF6');} |
| 309 | 0 | else if (hex.equals("u502E")==true) { decodeStr = Character.valueOf('\u88F8');} |
| 310 | 0 | else if (hex.equals("u5040")==true) { decodeStr = Character.valueOf('\u82F1');} |
| 311 | 0 | else if (hex.equals("u5042")==true) { decodeStr = Character.valueOf('\u524D');} |
| 312 | 0 | else if (hex.equals("u5070")==true) { decodeStr = Character.valueOf('\u5951');} |
| 313 | 0 | else if (hex.equals("u510B")==true) { decodeStr = Character.valueOf('\u62C5');} |
| 314 | 0 | else if (hex.equals("u519D")==true) { decodeStr = Character.valueOf('\u5B9C');} |
| 315 | 0 | else if (hex.equals("u51EE")==true) { decodeStr = Character.valueOf('\u98A8');} |
| 316 | 0 | else if (hex.equals("u525D")==true) { decodeStr = Character.valueOf('\u5265');} |
| 317 | 0 | else if (hex.equals("u525D")==true) { decodeStr = Character.valueOf('\u5265');} |
| 318 | 0 | else if (hex.equals("u52C8")==true) { decodeStr = Character.valueOf('\u52C7');} |
| 319 | 0 | else if (hex.equals("u5393")==true) { decodeStr = Character.valueOf('\u5D16');} |
| 320 | 0 | else if (hex.equals("u5500")==true) { decodeStr = Character.valueOf('\u8A98');} |
| 321 | 0 | else if (hex.equals("u5511")==true) { decodeStr = Character.valueOf('\u566C');} |
| 322 | 0 | else if (hex.equals("u555E")==true) { decodeStr = Character.valueOf('\u5516');} |
| 323 | 0 | else if (hex.equals("u555E")==true) { decodeStr = Character.valueOf('\u5516');} |
| 324 | 0 | else if (hex.equals("u5649")==true) { decodeStr = Character.valueOf('\u5556');} |
| 325 | 0 | else if (hex.equals("u5653")==true) { decodeStr = Character.valueOf('\u5618');} |
| 326 | 0 | else if (hex.equals("u5653")==true) { decodeStr = Character.valueOf('\u5618');} |
| 327 | 0 | else if (hex.equals("u5699")==true) { decodeStr = Character.valueOf('\u565B');} |
| 328 | 0 | else if (hex.equals("u5699")==true) { decodeStr = Character.valueOf('\u565B');} |
| 329 | 0 | else if (hex.equals("u569E")==true) { decodeStr = Character.valueOf('\u54F2');} |
| 330 | 0 | else if (hex.equals("u56CA")==true) { decodeStr = Character.valueOf('\u56A2');} |
| 331 | 0 | else if (hex.equals("u56CA")==true) { decodeStr = Character.valueOf('\u56A2');} |
| 332 | 0 | else if (hex.equals("u5723")==true) { decodeStr = Character.valueOf('\u8056');} |
| 333 | 0 | else if (hex.equals("u57C8")==true) { decodeStr = Character.valueOf('\u5CFB');} |
| 334 | 0 | else if (hex.equals("u5861")==true) { decodeStr = Character.valueOf('\u586B');} |
| 335 | 0 | else if (hex.equals("u5861")==true) { decodeStr = Character.valueOf('\u586B');} |
| 336 | 0 | else if (hex.equals("u5AF0")==true) { decodeStr = Character.valueOf('\u5AE9');} |
| 337 | 0 | else if (hex.equals("u5C1E")==true) { decodeStr = Character.valueOf('\u71CE');} |
| 338 | 0 | else if (hex.equals("u5C5B")==true) { decodeStr = Character.valueOf('\u5C4F');} |
| 339 | 0 | else if (hex.equals("u5C5B")==true) { decodeStr = Character.valueOf('\u5C4F');} |
| 340 | 0 | else if (hex.equals("u5C62")==true) { decodeStr = Character.valueOf('\u5C61');} |
| 341 | 0 | else if (hex.equals("u5C62")==true) { decodeStr = Character.valueOf('\u5C61');} |
| 342 | 0 | else if (hex.equals("u5C88")==true) { decodeStr = Character.valueOf('\u8C3A');} |
| 343 | 0 | else if (hex.equals("u5CBA")==true) { decodeStr = Character.valueOf('\u5DBA');} |
| 344 | 0 | else if (hex.equals("u5FB0")==true) { decodeStr = Character.valueOf('\u5F81');} |
| 345 | 0 | else if (hex.equals("u61BC")==true) { decodeStr = Character.valueOf('\u656C');} |
| 346 | 0 | else if (hex.equals("u6414")==true) { decodeStr = Character.valueOf('\u63BB');} |
| 347 | 0 | else if (hex.equals("u6414")==true) { decodeStr = Character.valueOf('\u63BB');} |
| 348 | 0 | else if (hex.equals("u6451")==true) { decodeStr = Character.valueOf('\u63B4');} |
| 349 | 0 | else if (hex.equals("u6451")==true) { decodeStr = Character.valueOf('\u63B4');} |
| 350 | 0 | else if (hex.equals("u64E5")==true) { decodeStr = Character.valueOf('\u652C');} |
| 351 | 0 | else if (hex.equals("u6522")==true) { decodeStr = Character.valueOf('\u6505');} |
| 352 | 0 | else if (hex.equals("u6522")==true) { decodeStr = Character.valueOf('\u6505');} |
| 353 | 0 | else if (hex.equals("u658A")==true) { decodeStr = Character.valueOf('\u6589');} |
| 354 | 0 | else if (hex.equals("u6609")==true) { decodeStr = Character.valueOf('\u70B3');} |
| 355 | 0 | else if (hex.equals("u6630")==true) { decodeStr = Character.valueOf('\u662F');} |
| 356 | 0 | else if (hex.equals("u663B")==true) { decodeStr = Character.valueOf('\u6602');} |
| 357 | 0 | else if (hex.equals("u663B")==true) { decodeStr = Character.valueOf('\u6602');} |
| 358 | 0 | else if (hex.equals("u6665")==true) { decodeStr = Character.valueOf('\u7696');} |
| 359 | 0 | else if (hex.equals("u66FA")==true) { decodeStr = Character.valueOf('\u66F9');} |
| 360 | 0 | else if (hex.equals("u6702")==true) { decodeStr = Character.valueOf('\u52D7');} |
| 361 | 0 | else if (hex.equals("u67FA")==true) { decodeStr = Character.valueOf('\u67B4');} |
| 362 | 0 | else if (hex.equals("u67FA")==true) { decodeStr = Character.valueOf('\u67B4');} |
| 363 | 0 | else if (hex.equals("u6805")==true) { decodeStr = Character.valueOf('\u67F5');} |
| 364 | 0 | else if (hex.equals("u6805")==true) { decodeStr = Character.valueOf('\u67F5');} |
| 365 | 0 | else if (hex.equals("u68A5")==true) { decodeStr = Character.valueOf('\u677E');} |
| 366 | 0 | else if (hex.equals("u6A03")==true) { decodeStr = Character.valueOf('\u6994');} |
| 367 | 0 | else if (hex.equals("u6A03")==true) { decodeStr = Character.valueOf('\u6994');} |
| 368 | 0 | else if (hex.equals("u6A45")==true) { decodeStr = Character.valueOf('\u6A21');} |
| 369 | 0 | else if (hex.equals("u6B56")==true) { decodeStr = Character.valueOf('\u559C');} |
| 370 | 0 | else if (hex.equals("u6BF1")==true) { decodeStr = Character.valueOf('\u97A0');} |
| 371 | 0 | else if (hex.equals("u6D82")==true) { decodeStr = Character.valueOf('\u5857');} |
| 372 | 0 | else if (hex.equals("u6F51")==true) { decodeStr = Character.valueOf('\u6E8C');} |
| 373 | 0 | else if (hex.equals("u6F51")==true) { decodeStr = Character.valueOf('\u6E8C');} |
| 374 | 0 | else if (hex.equals("u7006")==true) { decodeStr = Character.valueOf('\u6D9C');} |
| 375 | 0 | else if (hex.equals("u7006")==true) { decodeStr = Character.valueOf('\u6D9C');} |
| 376 | 0 | else if (hex.equals("u705E")==true) { decodeStr = Character.valueOf('\u8987');} |
| 377 | 0 | else if (hex.equals("u7130")==true) { decodeStr = Character.valueOf('\u7114');} |
| 378 | 0 | else if (hex.equals("u7130")==true) { decodeStr = Character.valueOf('\u7114');} |
| 379 | 0 | else if (hex.equals("u7147")==true) { decodeStr = Character.valueOf('\u6689');} |
| 380 | 0 | else if (hex.equals("u7411")==true) { decodeStr = Character.valueOf('\u7463');} |
| 381 | 0 | else if (hex.equals("u7431")==true) { decodeStr = Character.valueOf('\u5F6B');} |
| 382 | 0 | else if (hex.equals("u7626")==true) { decodeStr = Character.valueOf('\u75E9');} |
| 383 | 0 | else if (hex.equals("u7626")==true) { decodeStr = Character.valueOf('\u75E9');} |
| 384 | 0 | else if (hex.equals("u76A6")==true) { decodeStr = Character.valueOf('\u768E');} |
| 385 | 0 | else if (hex.equals("u7900")==true) { decodeStr = Character.valueOf('\u6F97');} |
| 386 | 0 | else if (hex.equals("u79B1")==true) { decodeStr = Character.valueOf('\u7977');} |
| 387 | 0 | else if (hex.equals("u79B1")==true) { decodeStr = Character.valueOf('\u7977');} |
| 388 | 0 | else if (hex.equals("u7C1E")==true) { decodeStr = Character.valueOf('\u7BAA');} |
| 389 | 0 | else if (hex.equals("u7C1E")==true) { decodeStr = Character.valueOf('\u7BAA');} |
| 390 | 0 | else if (hex.equals("u7CB7")==true) { decodeStr = Character.valueOf('\u9EB9');} |
| 391 | 0 | else if (hex.equals("u7E61")==true) { decodeStr = Character.valueOf('\u7E4D');} |
| 392 | 0 | else if (hex.equals("u7E61")==true) { decodeStr = Character.valueOf('\u7E4D');} |
| 393 | 0 | else if (hex.equals("u7E6B")==true) { decodeStr = Character.valueOf('\u7E4B');} |
| 394 | 0 | else if (hex.equals("u7E6B")==true) { decodeStr = Character.valueOf('\u7E4B');} |
| 395 | 0 | else if (hex.equals("u80DC")==true) { decodeStr = Character.valueOf('\u52DD');} |
| 396 | 0 | else if (hex.equals("u8330")==true) { decodeStr = Character.valueOf('\u8438');} |
| 397 | 0 | else if (hex.equals("u8346")==true) { decodeStr = Character.valueOf('\u834A');} |
| 398 | 0 | else if (hex.equals("u8346")==true) { decodeStr = Character.valueOf('\u834A');} |
| 399 | 0 | else if (hex.equals("u840A")==true) { decodeStr = Character.valueOf('\u83B1');} |
| 400 | 0 | else if (hex.equals("u840A")==true) { decodeStr = Character.valueOf('\u83B1');} |
| 401 | 0 | else if (hex.equals("u8493")==true) { decodeStr = Character.valueOf('\u84F4');} |
| 402 | 0 | else if (hex.equals("u8523")==true) { decodeStr = Character.valueOf('\u848B');} |
| 403 | 0 | else if (hex.equals("u8523")==true) { decodeStr = Character.valueOf('\u848B');} |
| 404 | 0 | else if (hex.equals("u8610")==true) { decodeStr = Character.valueOf('\u8431');} |
| 405 | 0 | else if (hex.equals("u8612")==true) { decodeStr = Character.valueOf('\u8429');} |
| 406 | 0 | else if (hex.equals("u87EC")==true) { decodeStr = Character.valueOf('\u8749');} |
| 407 | 0 | else if (hex.equals("u87EC")==true) { decodeStr = Character.valueOf('\u8749');} |
| 408 | 0 | else if (hex.equals("u881F")==true) { decodeStr = Character.valueOf('\u874B');} |
| 409 | 0 | else if (hex.equals("u881F")==true) { decodeStr = Character.valueOf('\u874B');} |
| 410 | 0 | else if (hex.equals("u88F5")==true) { decodeStr = Character.valueOf('\u88F4');} |
| 411 | 0 | else if (hex.equals("u8989")==true) { decodeStr = Character.valueOf('\u7F88');} |
| 412 | 0 | else if (hex.equals("u8990")==true) { decodeStr = Character.valueOf('\u899A');} |
| 413 | 0 | else if (hex.equals("u8A37")==true) { decodeStr = Character.valueOf('\u4F38');} |
| 414 | 0 | else if (hex.equals("u8EC0")==true) { decodeStr = Character.valueOf('\u8EAF');} |
| 415 | 0 | else if (hex.equals("u8EC0")==true) { decodeStr = Character.valueOf('\u8EAF');} |
| 416 | 0 | else if (hex.equals("u91AC")==true) { decodeStr = Character.valueOf('\u91A4');} |
| 417 | 0 | else if (hex.equals("u91AC")==true) { decodeStr = Character.valueOf('\u91A4');} |
| 418 | 0 | else if (hex.equals("u91B1")==true) { decodeStr = Character.valueOf('\u9197');} |
| 419 | 0 | else if (hex.equals("u91B1")==true) { decodeStr = Character.valueOf('\u9197');} |
| 420 | 0 | else if (hex.equals("u969D")==true) { decodeStr = Character.valueOf('\u5CF6');} |
| 421 | 0 | else if (hex.equals("u974D")==true) { decodeStr = Character.valueOf('\u9DB4');} |
| 422 | 0 | else if (hex.equals("u974E")==true) { decodeStr = Character.valueOf('\u9DB4');} |
| 423 | 0 | else if (hex.equals("u974F")==true) { decodeStr = Character.valueOf('\u9DB4');} |
| 424 | 0 | else if (hex.equals("u982B")==true) { decodeStr = Character.valueOf('\u4FEF');} |
| 425 | 0 | else if (hex.equals("u9830")==true) { decodeStr = Character.valueOf('\u982C');} |
| 426 | 0 | else if (hex.equals("u9830")==true) { decodeStr = Character.valueOf('\u982C');} |
| 427 | 0 | else if (hex.equals("u985A")==true) { decodeStr = Character.valueOf('\u985B');} |
| 428 | 0 | else if (hex.equals("u985A")==true) { decodeStr = Character.valueOf('\u985B');} |
| 429 | 0 | else if (hex.equals("u9A52")==true) { decodeStr = Character.valueOf('\u9A28');} |
| 430 | 0 | else if (hex.equals("u9A52")==true) { decodeStr = Character.valueOf('\u9A28');} |
| 431 | 0 | else if (hex.equals("u9DD7")==true) { decodeStr = Character.valueOf('\u9D0E');} |
| 432 | 0 | else if (hex.equals("u9DD7")==true) { decodeStr = Character.valueOf('\u9D0E');} |
| 433 | 0 | else if (hex.equals("u9E7C")==true) { decodeStr = Character.valueOf('\u9E78');} |
| 434 | 0 | else if (hex.equals("u9E7C")==true) { decodeStr = Character.valueOf('\u9E78');} |
| 435 | 0 | else if (hex.equals("u9EB4")==true) { decodeStr = Character.valueOf('\u9EB9');} |
| 436 | 0 | else if (hex.equals("u9EB4")==true) { decodeStr = Character.valueOf('\u9EB9');} |
| 437 | 0 | else if (hex.equals("u9EB5")==true) { decodeStr = Character.valueOf('\u9EBA');} |
| 438 | 0 | else if (hex.equals("u9EB5")==true) { decodeStr = Character.valueOf('\u9EBA');} |
| 439 | 0 | else if (hex.equals("u9FA2")==true) { decodeStr = Character.valueOf('\u548C');} |
| 440 | |
else { |
| 441 | 0 | decodeStr = value.charAt(0); |
| 442 | |
} |
| 443 | 0 | return Character.toString(decodeStr); |
| 444 | |
} |
| 445 | |
} |