qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arnaud Simon (JIRA)" <qpid-...@incubator.apache.org>
Subject [jira] Resolved: (QPID-527) encoding issue
Date Wed, 20 Jun 2007 14:11:25 GMT

     [ https://issues.apache.org/jira/browse/QPID-527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Arnaud Simon resolved QPID-527.
-------------------------------

    Resolution: Fixed

I have updated the class JMSTextMessage method setText to use UTF8 as default encoder. 
Done in M2 branch and trunk 

> 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.


Mime
View raw message