Skip to content

Conversation

@hpalz
Copy link

@hpalz hpalz commented Apr 3, 2018

I ran into an issue with this library when parsing multiple messages with international characters. Since the messages are encoded using Buffer.byteLength, the substring in handleData fails (since byteLength will be greater than the actual substring length):
https://github.com/sebastianseilund/node-json-socket/blob/master/lib/json-socket.js#L106

I am pushing 3 commits to demonstrate the issue and support the bug fix proposal.

Please let me know if you have any questions or concerns! 🍻

@hpalz
Copy link
Author

hpalz commented Apr 4, 2018

Not sure why the test failed for node v0.12. I tried it locally for that version and it worked fine. Is there a way to retest?

@hpalz
Copy link
Author

hpalz commented Apr 4, 2018

Added a new issue to support the PR: #47

@foi
Copy link
Contributor

foi commented Jul 11, 2018

@hpalz + 1 I think it should be merged

@ken-okabe
Copy link

@hpalz Hi, Thanks a lot for your fix. I personally need a fixed version of NPM (using this library from TypeScript code seems that is the only adequate way without typing the whole code.)

So, I forked and published a fixed version to npm.

https://www.npmjs.com/package/json-socket-international

Regards.

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.

4 participants