代码:
String input = "中华收藏网.cn/";//http://xn--fiqw8j69r1tyo1g.cn/ String ascii = IDN.toASCII(input); String unicode = IDN.toUnicode(input); System.out.println("Input:"+ input); System.out.println("toAscii (input):"+ ascii); System.out.println("toUnicode (input):"+ unicode);
时间: 2024-10-12 19:58:38