Fixed java unicode bug in string of unknown char exception

This commit is contained in:
Willem Cazander 2025-01-07 19:41:28 +01:00
parent bac0041239
commit 3abd987584

View file

@ -183,7 +183,12 @@ public class FourCornerUnicodeImport {
continue;
}
}
throw new IllegalArgumentException("Unsupported char: '" + ((char)codePoint) + "' 0x" + Integer.toHexString(codePoint));
StringBuilder err = new StringBuilder();
err.append("Unsupported char: '");
err.appendCodePoint(codePoint);
err.append("' 0x");
err.append(Integer.toHexString(codePoint));
throw new IllegalArgumentException(err.toString());
}
return result;
}