rnetuka opened a new pull request, #15515: URL: https://github.com/apache/camel/pull/15515
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: https://github.com/FasterXML/jackson-core/issues/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": "システム𩸽"}]` Solution: While it's an error in Jackson-core, it could be avoided by forcing Jackson to use _WriterBasedJsonGenerator_ instead of _UTF8JsonGenerator_ (see the original Jackson issue reproducer in the topmost comment) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
