cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate McCall (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-2379) ByteBufferUtil#bytes(String) can produce undesired results for some characters
Date Thu, 24 Mar 2011 17:17:05 GMT

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

Nate McCall updated CASSANDRA-2379:
-----------------------------------

    Attachment: 2379.txt

Patch for ByteBufferUtil to use the Charset.defaultCharset for consistency with the decoding
methods

> ByteBufferUtil#bytes(String) can produce undesired results for some characters
> ------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2379
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2379
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Nate McCall
>         Attachments: 2379.txt
>
>
> The difference between getBytes(java.nio.charset.Charset) vs. getBytes("[charsetname]")
on some platforms (mac it seems) can be substantial. From the java.lang.String javadoc for
the former:
> This method always replaces malformed-input and unmappable-character sequences with this
charset's default replacement byte array...
> vs. the latter:
> The behavior of this method when this string cannot be encoded in the default charset
is unspecified.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message