node-json-socket
node-json-socket copied to clipboard
Multiple messages with international characters fail
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