[cgiirc-general] Encoding problem
Brought to you by:
dgl
|
From: Hanno F. <hur...@ti...> - 2018-05-27 16:05:32
|
Hello,
when upgrading my CGI:IRC from 0.5.11 to CGI:IRC 0.5.12 this weekend, I
noticed that I was unable to get German umlauts (äöü etc.) to display
correctly. The issue was already there with 0.5.11, and probably before.
äöü were being sent to the IRC server as well as the broswer as string
%EF%BF%BD%EF%BF%BD%EF%BF%BD with %EF%BF%BD being the unicode replacement
character. Umlauts being send from other clients over IRC to CGI:IRC
were not being displayed corretly either, no matter if they were sent in
UTF-8 or ISO-8859-1. Playing around with "irc charset" just got me
differently looking mangled characters.
My workaround is to change in sub parse_query from parse.pl
if($::ENCODE) {
to
if(0) {
ie. disabling the following decoding functions. With "irc charset" set
to default (UTF-8), now everything works as intended: Umlauts sent form
other clients in either UTF-8 or ISO-8859-1 get displayed fine, CGI:IRC
sends in UTF-8 which other clients as well as CGI:IRC are able to
display, too. The only thing I didn't get to work was CGI:IRC sending in
ISO-8859-1 and being able to display its own input correctly.
My workaround works for me, but I don't think it is the correct fix. It
would be nice if someone more knowledgeable than me could look into the
issue.
- Hanno
|