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

Long lines are split by character, not byte #507

Open
Sanqui opened this issue Mar 16, 2017 · 0 comments
Open

Long lines are split by character, not byte #507

Sanqui opened this issue Mar 16, 2017 · 0 comments

Comments

@Sanqui
Copy link

Sanqui commented Mar 16, 2017

Messages sent to IRC are split due to the IRC command length limit of 512 bytes. This appears to be done by the _splitLongLines function.

The current splitting method seems to count Unicode characters rather than bytes, resulting in (possibly large) parts of the message disappearing. It needs to be changed to count bytes of the string encoded in utf-8.

Noticed with discord-irc, issue reactiflux/discord-irc#199 (contains a test log). discord-irc is using node-irc version 0.5.2.

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