Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Camel-jackson doesn't handle 4-byte characters well. Marshalling a 4-byte Japanese kanji character results in two UTF-16 escapes to be written instead of the character itself. While this is ok for emoji an such, it's not for natural languages.
Jackson issue: FasterXML/jackson-core#223
Reproducer:
from("file:data?file-name=input.txt&noop=true") .log("${body}") .unmarshal().json(JsonLibrary.Jackson) .log("${body[0]['name']}") .marshal().json(JsonLibrary.Jackson, true) .log("${body}");
with the file input.txt containing:
[{"name": "システム𩸽"}]
Expected output seen in the log: "システム𩸽"
Actual output seen in the log: "システム\uD867\uDE3D"