[
https://issues.apache.org/jira/browse/ZOOKEEPER-1976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14068484#comment-14068484
]
Bill Havanki commented on ZOOKEEPER-1976:
-----------------------------------------
These aren't so much "internationalization" issues as issues where Java doesn't
know for sure how to convert characters into bytes or vice versa. In these
cases Java uses the platform default encoding, which differs between Linux and
Windows and Mac (yes, and different countries too). Despite all the
complexities, usually the fix is just to specify UTF-8 everywhere. :)
{code}
import java.nio.charset.Charset;
private static final Charset UTF_8 = Charset.forName("UTF-8");
// or, in Java 7, just use StandardCharsets.UTF_8
String s = new String(bytes, UTF_8);
byte[] bs = s.getBytes(UTF_8);
{code}
> address internationalization issues identified by findbugs 2.0.3
> ----------------------------------------------------------------
>
> Key: ZOOKEEPER-1976
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1976
> Project: ZooKeeper
> Issue Type: Bug
> Components: server
> Affects Versions: 3.5.0
> Reporter: Patrick Hunt
>
> Findbugs 2.0.3 found a number of internationalization issues with the code,
> we ignored these for the time being in ZOOKEEPER-1975, however we should
> address them one by one eventually.
--
This message was sent by Atlassian JIRA
(v6.2#6252)