[ https://issues.apache.org/jira/browse/CAMEL-21199?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Radovan Netuka updated CAMEL-21199: ----------------------------------- 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|https://github.com/FasterXML/jackson-core/issues/223] Reproducer: {code:java} 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}"); {code} with the file input.txt containing: {code:java} [{"name": "システム𩸽"}] {code} was: 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|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: {code:java} [{"name": "システム𩸽"}] {code} > Camel-jackson not properly marshalling 4-byte characters > -------------------------------------------------------- > > Key: CAMEL-21199 > URL: https://issues.apache.org/jira/browse/CAMEL-21199 > Project: Camel > Issue Type: Bug > Components: camel-jackson > Reporter: Radovan Netuka > Assignee: Radovan Netuka > Priority: Major > > 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|https://github.com/FasterXML/jackson-core/issues/223] > > Reproducer: > {code:java} > 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}"); {code} > > with the file input.txt containing: > {code:java} > [{"name": "システム𩸽"}] {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)