英文:
Convert Latin 1 supplementary unicode to string in java
问题
Sure, here's the translated code snippet:
public static void convertUnicodeToCharacter(){
String unicode = "\\U+00C3";
System.out.println(StringEscapeUtils.unescapeJava(unicode));
}
And the relevant text:
我需要将 Latin 1 补充字符的 Unicode 转换为字符。
但在我的程序中,相同的 Unicode 是输出。
但是当我使用 String unicode = "\u0196"; 时,它可以正常工作。我如何解决这个问题。
英文:
I need to convert Latin 1 supplement unicodes to characters.
But in my program the same unicode is the output.
public static void convertUnicodeToCharacter(){
String unicode ="\\U+00C3";
System.out.println(StringEscapeUtils.unescapeJava(unicode));
}
But when I use the String unicode ="\u0196"; it works fine. How can I solve this.
专注分享java语言的经验与见解,让所有开发者获益!
评论