Skip to content
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

Spec length for UTF8 encoded strings seems to always be 2 characters short #53

Closed
boomskats opened this issue Sep 30, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@boomskats
Copy link
Contributor

Pretty sure it's down to this:

specs[key].colLength = Math.max(specs[key].colLength, colLength - 2);

It works fine when there are no multibyte characters involved. This should also solve the PROC JSON bug we've been seeing with the utf8 tests, as they've been failing when the last character has been a triple byte char split truncated by 2 bytes.

@boomskats boomskats added the bug label Sep 30, 2017
@boomskats boomskats added this to the utf8-v1 milestone Sep 30, 2017
@bojan88
Copy link
Collaborator

bojan88 commented Oct 2, 2017

Fixed in 12f3bd4, and changed test for UTF-8. It's working now with 3-byte characters

@bojan88 bojan88 closed this as completed Oct 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants