[
https://issues.apache.org/jira/browse/STORM-437?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14086100#comment-14086100
]
ASF GitHub Bot commented on STORM-437:
--------------------------------------
GitHub user itaifrenkel opened a pull request:
https://github.com/apache/incubator-storm/pull/216
STORM-437 Enforce utf-8 when reading from stdin
for more details see:
https://issues.apache.org/jira/browse/STORM-437
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/forter/incubator-storm
STORM-437-multilang-utf8
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-storm/pull/216.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #216
----
commit c54539be9e7bd4ea12acdc3d491d0518fdb0a3be
Author: Itai Frenkel <[email protected]>
Date: 2014-08-05T10:43:34Z
Enforce utf-8 when reading from stdin
----
> multilang JsonSerializer does not enforce inputstream UTF-8 encoding
> --------------------------------------------------------------------
>
> Key: STORM-437
> URL: https://issues.apache.org/jira/browse/STORM-437
> Project: Apache Storm (Incubating)
> Issue Type: Bug
> Affects Versions: 0.9.2-incubating
> Environment: AWS ubuntu 12.04 oracle java7
> Reporter: Itai Frenkel
>
> On some machines UTF-8 gets corrupted over the multilang protocol. Analysis
> of the problem leads to JsonSerializer usage of InputStreamReader when
> reading from stdin.
> InputStreamReader uses the JVM defaults, which is usually UTF-8 but not
> always.
> Temporary Workaround:
> Edit storm/conf/storm.yaml and enforce the default JVM charset as follows:
> worker.childopts: "-Xmx768m -Dfile.encoding=UTF-8"
> Required Fix in JsonSerializer:
> Pass the string "UTF-8" to the InputStreamReader constructor as second
> argument.
> Notes:
> The implementation already enforces UTF-8 when writing to stdout, so there is
> no other fix needed there.
> python simplejson and ruby json gem use UTF-8 as the default.
--
This message was sent by Atlassian JIRA
(v6.2#6252)