From 3abd987584ef7606882a80219d59a3bc13c07283 Mon Sep 17 00:00:00 2001 From: Willem Date: Tue, 7 Jan 2025 19:41:28 +0100 Subject: [PATCH] Fixed java unicode bug in string of unknown char exception --- .../java/org/x4o/o2o/fc18/FourCornerUnicodeImport.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/FourCornerUnicodeImport.java b/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/FourCornerUnicodeImport.java index 4a70ad3..f098a65 100644 --- a/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/FourCornerUnicodeImport.java +++ b/nx01-x4o-o2o/src/main/java/org/x4o/o2o/fc18/FourCornerUnicodeImport.java @@ -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; }