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

Zero width space character is breaking messages with UTF-8 characters in nickname in simple mode #77

Open
ynerant opened this issue Feb 13, 2021 · 2 comments

Comments

@ynerant
Copy link

ynerant commented Feb 13, 2021

My nickname starts with a ÿ, and the ZERO WIDTH SPACE character that is added between the first and the second characters in the nickname in simple mode:

<Ãâ  ¿nérant#0719> plop

This also breaks UTF-8 characters in the content of the message.

I suggest to remove the U+200B character (it is working without it), why is it needed?

@llmII
Copy link
Contributor

llmII commented Feb 13, 2021

The zero width space is probably used to keep from highlighting and notifying. I remember seeing it inserted for @everyone and such so I know it's at least in use to prevent highlighting on Discord side but wouldn't surprise me if it's also used to prevent accidental IRC nick highlights too.

@qaisjp
Copy link
Owner

qaisjp commented Feb 14, 2021

The zwsp is to prevent self-tagging on the IRC side.

I don't think it's used on the discord side.

The correct fix would be to, when modifying, "process" the nickname as a utf8 string instead of a plain sequence of bytes. This should be an easy fix.

Useful pre-reading for whoever wants to fix this: https://blog.golang.org/strings

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

3 participants