Github user myui commented on the issue:
https://github.com/apache/incubator-hivemall/pull/82
@helenahm thank you for the bug report.
@takuti
`String.getBytes()` and `new String(byte[])` should be avoided to avoid
encoding/decoding problem (UTF16 to . See the JDK implementation.
Better to replace the current code using `String.charAt(int)` and `new
String(char[])`. See `hivemall.utils.IOUtils`.
```
final int len = s.length();
out.writeInt(len);
for (int i = 0; i < len; i++) {
int v = s.charAt(i);
out.writeChar(v);
}
final char[] ch = new char[len];
for (int i = 0; i < len; i++) {
ch[i] = in.readChar();
}
return new String(ch);
```
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---