encoding issue
--------------
Key: QPID-527
URL: https://issues.apache.org/jira/browse/QPID-527
Project: Qpid
Issue Type: Bug
Components: Java Client
Affects Versions: M2, M3
Reporter: Arnaud Simon
Fix For: M2, M3
In the JMSTextMessage, charset encoding is not done consistently between
getText and setText. In setText, it uses the default behavior of the
string class to get the bytes:
if (encoding == null)
{
_data.put(text.getBytes());
}
Whereas in getText, it uses member DEFAULT_CHARSET (which is set to
UTF8)
_decodedValue = _data.getString(DEFAULT_CHARSET.newDecoder());
This causes problems such as if the jvm thinks the charset is ANSI (or
ISO-8859-1), it won't encode bytes over the 7F value in the way UTF8
expects for decoding, and an exception is thrown.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.