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

IRC color codes break UTF-8 decoding #1283

Open
Tronic opened this issue Apr 8, 2021 · 0 comments
Open

IRC color codes break UTF-8 decoding #1283

Tronic opened this issue Apr 8, 2021 · 0 comments
Labels
S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.

Comments

@Tronic
Copy link

Tronic commented Apr 8, 2021

Messages sent from IRC to Matrix get incorrectly decoded using fallback charset rather than UTF-8 if they contain IRC color codes which begin with byte \x03. An example, with IRC client configured to use UTF-8:

<ircuser> Testing ä ö
<ircuser> ^C07Testing ä ö  (^C means pressing Ctrl+C in an IRC client, initiating a color sequence)

This displays on Matrix side with the second row in orange (as specified by color code 07) but with umlauts misdecoded using the fallback charset where UTF-8 should be used:

<ircuser> Testing ä ö
<ircuser> Testing À ö

Note: \x03 is completely valid UTF-8, although its meaning is a control character rarely ever used in normal systems (other than IRC).

Expected behavior: presence of colors in messages should not affect the decoding charset used. Umlauts should display as ä and ö on both rows.

I hope that I posted this issue on the correct project, considering that I'm using the IRC bridge at https://syscom.utwente.io/info/matrix/irc/ircnet/ and the Element Web client.

@justinbot justinbot added T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems. S-Minor Impairs non-critical functionality or suitable workarounds exist labels May 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Bugs, crashes, hangs, vulnerabilities, or other reported problems.
Projects
None yet
Development

No branches or pull requests

2 participants