unicode转ascii java
时间:2021-11-10 作者:匿名
好像百度到一个有问题
只能解析一半
这个可以用
private static String ascii2native ( String asciicode ) { String[] asciis = 域名t ("\\\\\\\\u"); String nativeValue = asciis[0]; try { for ( int i = 1; i < 域名th; i++ ) { String code = asciis[i]; nativeValue += (char) 域名eInt (域名tring (0, 4), 16); if (域名th () > 4) { nativeValue += 域名tring (4, 域名th ()); } } } catch (NumberFormatException e) { return asciicode; } return nativeValue; }