accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Elser <josh.el...@gmail.com>
Subject Re: Setting Charset in getBytes() call.
Date Fri, 02 Nov 2012 23:34:43 GMT
I also worked through the changes and found some questionable changes.

https://issues.apache.org/jira/browse/ACCUMULO-836?focusedCommentId=13489228&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13489228

On 10/31/2012 01:02 PM, Christopher Tubbs wrote:
> I've added my own comments to this thread on the ACCUMULO-840 ticket.
> https://issues.apache.org/jira/browse/ACCUMULO-840?focusedCommentId=13488024&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13488024
>
> --
> Christopher L Tubbs II
> http://gravatar.com/ctubbsii
>
>
> On Tue, Oct 30, 2012 at 10:35 PM, John Vines<vines@apache.org>  wrote:
>> Why not just have a configuration in the xml file for setting a global
>> charset? This way we avoid hard coded settings but also avoid the issue of
>> shared vm issues.
>>
>> John
>>
>> Sent from my phone, pardon the typos and brevity.
>> On Oct 30, 2012 10:29 PM, "David Medinets"<david.medinets@gmail.com>  wrote:
>>
>>> Re-reading and re-thinking I can see your point about how, by
>>> specifying UTF-8, Accumulo is now flouting the file.encoding
>>> parameter. I'd like to implement a static method inside
>>> core/src/main/java/org/apache/accumulo/core/util/Encoding.java. Then
>>> do something like getBytes(Encoding.getCharset()) instead of
>>> hard-coding UTF-8.
>>>
>>> Class Encoding {
>>>    private static final Charset charset = null;
>>>    public Charset getCharset() {
>>>      if (charset == null) {
>>>        charset = Charset.forName(System.getProperty("file.encoding",
>>> "UTF-8"));
>>>      }
>>>      return charset;
>>>    }
>>>    ...
>>> }
>>>

Mime
View raw message