回答編集履歴
1
StringBufferじゃなくてnew Stringで作るようにしました。
test
CHANGED
@@ -56,11 +56,7 @@
|
|
56
56
|
|
57
57
|
public static byte[] toUtf8(String str) {
|
58
58
|
|
59
|
-
return new StringBuffer()
|
60
|
-
|
61
|
-
|
59
|
+
return new String(Character.toChars(Integer.parseInt(str)))
|
62
|
-
|
63
|
-
.toString()
|
64
60
|
|
65
61
|
.getBytes(java.nio.charset.StandardCharsets.UTF_8);
|
66
62
|
|