[
https://issues.apache.org/jira/browse/ARTEMIS-3598?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17456566#comment-17456566
]
Gary Tully commented on ARTEMIS-3598:
-------------------------------------
ok, I have reproduced, \337 is the key, that needs two bytes of unicode, but it
is being encoded in one, the length of the encoding is off. Java does it
correctly but the cpp client does not.
the culprit seems to be:
[https://github.com/apache/activemq-cpp/blob/master/activemq-cpp/src/main/activemq/commands/ActiveMQTextMessage.cpp#L148]
and:
[https://github.com/apache/activemq-cpp/blob/master/activemq-cpp/src/main/activemq/util/MarshallingSupport.cpp#L84]
it does not support multi byte strings. I see some hints in further methods
that it was considered, but it is not done!
I guess that is the place for a fix if it is necessary.
feel free to peek at:
[https://github.com/apache/activemq/blob/main/activemq-client/src/main/java/org/apache/activemq/util/MarshallingSupport.java#L299]
for inspiration.
> Sending text message non-UTF-8 containing special characters from OpenWire
> ---------------------------------------------------------------------------
>
> Key: ARTEMIS-3598
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3598
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: ActiveMQ-Artemis-Native, OpenWire
> Affects Versions: 2.16.0, 2.17.0
> Reporter: Pierre-Henry Brasseur
> Assignee: Gary Tully
> Priority: Major
> Attachments: Artemis - example cpp.png, Artemis - example-1.png,
> Artemis - example.png, Artemis - stack traces from cpp client.png, Artemis -
> stack traces.png, Re Question about charset supported by Artemis.msg, main.c,
> verifyUtf.patch
>
>
> When a text message non-UTF-8 (ISO-8859-15) containing special characters is
> sent from OpenWire, this raised an exception
> :"java.io.UTFDataFormatException" which is not correctly handle and prevent
> the sending of the text message.
> See email from ActiveMQ Community in attachment for more details.
> [^Re Question about charset supported by Artemis.msg]
>
> This was working with previous ActiveMQ version (v5.15.9).
>
> Identified during following test :
> Text message sent from a C program using the Fuse ActiveMQ-Client C library
> to Artemis v2.16.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)