Skip to content

Fix: Write all bytes of UTF-8 String#13

Open
ckesc wants to merge 2 commits into
msemm:masterfrom
ckesc:pr-msemm
Open

Fix: Write all bytes of UTF-8 String#13
ckesc wants to merge 2 commits into
msemm:masterfrom
ckesc:pr-msemm

Conversation

@ckesc

@ckesc ckesc commented Mar 22, 2018

Copy link
Copy Markdown

According to JavaDoc RandomAccessFile.writeBytes() writes each character in the string by discarding its high eight bits. This is ok for latin charactes, but it corruptes non-latin charactes. For example: russian charactes.

That's why I used RandomAccessFile.write() and String.getBytes("UTF-8")) to write all bytes of charactes

This PR fixes these issues:
#1
#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant