Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
「0x20000」() や「0x00F8」(ø) などの Unicode 16 進値の文字列表現のリストがあり、次のような関数を使用できるように int コード ポイントを取得する必要があります: char[] chars = Character .toChars(0x20000);
これは、BMP と補助文字をカバーする必要があります。どうしようもないので、何かお役に立てれば幸いです。
独自の実装を作成できますNumberFormatが、それよりも簡単に次のようなことができます。
NumberFormat
String hexString = "0x20000"; int hexInt = Integer.parseInt(hexString.substring(2), 16); String stringRepresentation = new String(Character.toChars(hexInt)); System.out.println(stringRepresentation); //prints ""