-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Content is corrupted in case of utf8 multibyte characters #743
Comments
I think this should be fixed by #745 could you please test it? |
I've tested it and it seems that it works! |
pokoli
pushed a commit
that referenced
this issue
Nov 20, 2019
Ok, so I've merged #745 which fixes this |
Are going to publish this fix soon? |
I've just published 5.1.1 which contains this fix! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found that in version 5.1.0 downloaded cvs parsed incorrectly in case if source data contains utf8 multibyte characters (whereas 5.0.2 didn't have this issue). I noticed that PapaParse tried to download second chunk even if there no any extra bytes:
First chunk:
Second chunk (not necessary)
After some digging I think that problem here
this._start += xhr.responseText.length;
Because Content-Length can be greater then text length (because some characters can be 2 or more bytes).
I think it should be something like this:
this._start += +xhr.getResponseHeader('Content-Length');
The text was updated successfully, but these errors were encountered: