commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (CODEC-73) Make string2byte conversions indepedent of platform default encoding
Date Thu, 06 Aug 2009 18:27:15 GMT

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

Niall Pemberton resolved CODEC-73.
----------------------------------

    Resolution: Fixed

> Make string2byte conversions indepedent of platform default encoding
> --------------------------------------------------------------------
>
>                 Key: CODEC-73
>                 URL: https://issues.apache.org/jira/browse/CODEC-73
>             Project: Commons Codec
>          Issue Type: Bug
>    Affects Versions: 1.3
>         Environment: any platform whose default encoding is not a superset of ASCII,
e.g. UTF-16 or EBCDIC
>            Reporter: Benjamin Bentmann
>             Fix For: 1.4
>
>         Attachments: CODEC-73.patch, Hex.patch
>
>
> Both the library itself and many of its tests are utterly dependent on the JVM's default
charset. For example, {{DigestUtils}} calls {{String.getBytes()}} to convert an input string
to a byte array, happily delivering different digests for the same input string if run on
different platforms.
> If you want to try out the havor yourself, just run the unit tests in a JVM with UTF-16,
e.g. by adding the line
> {code:xml}
> <argLine>-Dfile.encoding=UTF-16</argLine>
> {code}
> to the configuration of the Surefire Plugin in the POM.

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