Jesse Gorzinski created CAMEL-18392:
---------------------------------------
Summary: UTF-8 improvement for data queues
Key: CAMEL-18392
URL: https://issues.apache.org/jira/browse/CAMEL-18392
Project: Camel
Issue Type: Improvement
Components: camel-jt400
Affects Versions: 3.9.0
Reporter: Jesse Gorzinski
Assignee: Jesse Gorzinski
A popular trend lately is to send UTF-8 JSON data through data queues on IBM i.
Currently, the JT400 components has a `format` parameter that can be either
"binary" or "text". This parameter affects how the component interprets both
the data queue key as well as the data queue data.
JSON is text, but unfortunately the CCSID (encoding) used for text mode assumes
the CCSID of the connection, and IBM i does not support unicode connections! :(
In order to properly read UTF-8 data from the queue, you need to use
`format=binary` and then convert to String manually (for instance, with
`.convertBodyTo(String.class, "UTF-8")`).
This isn't all-in-all horrible, but I've seen it catch a decent number of
people. This should be addressed by either or both of:
* Having a UTF-8 example in the doc
* Providing a new `dataQueueCCSID` parameter that allows for the explicit
declaration of CCSID read from the data independent from the connection CCSID
--
This message was sent by Atlassian Jira
(v8.20.10#820010)