accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Medinets <david.medin...@gmail.com>
Subject Re: Setting Charset in getBytes() call.
Date Tue, 30 Oct 2012 23:47:29 GMT
> My issue with this is that you have now hard-coded the fact that everyone else is going
to use UTF-8.

Who is everyone else? I agree that I have hard-coded the use of UTF-8.
On the other hand, I've merely codified an existing practice. Thus the
issue is now exposed, the places the convention is used are defined.
Once a consensus is reached, we can implement it with confidence.

> way to fix the problem. I still contest that setting the desired encoding
> (via the appropriate JVM property like Bill Slacum initial suggested) is the
> proper way to address the issue.

It is easy to do both. Create a ByteEncodingInitializer (or somesuch)
class that reads the JVM property and defines a globally used Charset.
The find those utf8 definitions and usages and replace them with the
globally-defined value.

Mime
View raw message