[
https://issues.apache.org/jira/browse/HBASE-19498?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16293422#comment-16293422
]
stack commented on HBASE-19498:
-------------------------------
bq. But if we really want to move to specifying charset manually, then it's
better to have a util function StringtoBytesUtf8 and use it everywhere then
current approach.
This we have and we use it everywhere. See Bytes.toString.
bq. I also found
https://stackoverflow.com/questions/361975/setting-the-default-java-character-encoding
While happy at first, but it might not be good idea to change default charset
globally. Might have very bad consequence in some places.
Yeah, thats about setting the platform coding.
We have setting the charset encoding Strings when we write to zk or the db
since near-to day-one as UTF-8 (see Bytes class). When we write out web pages,
they have at the head that they are encoded as UTF-8. We don't advertise it and
we should but we log data in UTF-8. When we dump on the console its usually
UTF-8 (this might clash w/ terminal charset).
This patch adds UTF-8 specification in remaining places where it goes
unspecified. Some is silly (tests), some makes sense, dumping mbean output, and
while there are cases where if data had been encoded with one charset and read
back w/ another, i don't see instances in this patch.
I was going to commit to get it in because it will rot if we leave it hang.
Having it in also makes backport to 1.4 run smoother since it already has these
patches.
Good on you [~appy]
> Fix findbugs and error-prone warnings in hbase-client (branch-2)
> ----------------------------------------------------------------
>
> Key: HBASE-19498
> URL: https://issues.apache.org/jira/browse/HBASE-19498
> Project: HBase
> Issue Type: Sub-task
> Reporter: Peter Somogyi
> Assignee: Peter Somogyi
> Fix For: 2.0.0-beta-1
>
> Attachments: HBASE-19498.master.001.patch,
> HBASE-19498.master.002.patch, HBASE-19498.master.003.patch,
> HBASE-19498.master.004.patch
>
>
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)