-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reading 24 bytes possibly results in incorrect chunks #13
Comments
Seems plausible. Can you submit a PR that has a test that showcases this problem? Then you can update the PR with the fix (I guess flooring to the nearest 3 divisible) and we can do a release. |
This was referenced Apr 12, 2021
I'm currently working on this. I found error strings like:
It might take some time because I need a complete list of error cases. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I apologize in advance if this issue is a false alarm.
When reading 24 bytes in the middle and end of buffer (for method 'getEncodingSync'),
isn't it possible to get incorrectly chunked bytes?
For instance, let's say a file is consisted of 75 characters of '한', which is a Korean character represented as 3 bytes for utf8 encoding.
If we want to read middle 24 bytes, then
However, since 88 is not multiple of 3,
buffer.toString(encoding, 88, 112)
will not result in the list of Korean characters '한'.Please let me know if I am misunderstanding.
Thank you very much!
The text was updated successfully, but these errors were encountered: