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

Multiple messages with international characters fail #47

Open
hpalz opened this issue Apr 4, 2018 · 0 comments
Open

Multiple messages with international characters fail #47

hpalz opened this issue Apr 4, 2018 · 0 comments

Comments

@hpalz
Copy link

hpalz commented Apr 4, 2018

When parsing multiple messages, the _handleData falls into this else case:
https://github.com/sebastianseilund/node-json-socket/blob/master/lib/json-socket.js#L107

which will take a substring of the message based on the size defined before the message.

However, in the event of having international characters, the use of byteLength instead of string length will make the substring too long:
https://github.com/sebastianseilund/node-json-socket/blob/master/lib/json-socket.js#L159

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

No branches or pull requests

1 participant