commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <>
Subject [jira] [Commented] (CODEC-159) BaseNCodec uses UTF-8 rather than US_ASCII for byte conversions
Date Sat, 30 Mar 2013 06:29:15 GMT


Gary Gregory commented on CODEC-159:

Thoughts from the community? I am worried about b/w compatibility for edge cases that may
rely on > ASCII values.
> BaseNCodec uses UTF-8 rather than US_ASCII for byte conversions
> ---------------------------------------------------------------
>                 Key: CODEC-159
>                 URL:
>             Project: Commons Codec
>          Issue Type: Bug
>            Reporter: Sebb
> According to RFC 4648 [1], base32 and base64 should use the US-ASCII charset.
> However, the code currently uses UTF-8.
> This should not make a difference when converting from byte[] to String, because the
bytes will always be US-ASCII.
> However, depending on how the conversion treats characters which are UTF-8 but not ASCII,
it could affect the behaviour when decoding non-ASCII strings.
> Should the code use newStringUsAscii(byte[])/getBytesUsAscii(String) throughout?
> Some of the Javadoc will need adjusting if so.
> [1]

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message