Subject: | Possible encoding bug in POE::Component::IRC::Plugin::Logger |
Date: | Sat, 1 Sep 2012 18:53:15 +0200 |
To: | bug-poe-component-irc [...] rt.cpan.org |
From: | Jens Heremans <jensheremans [...] gmail.com> |
Hello
I think I have encountered a bug in POE::Component::IRC::Plugin::Logger
related to character encoding.
Whenever I add this plugin my bot seems unable to properly send unicode
characters to irc, this seems to be caused by some char transcoding from
the Logger plugin. When I set my script to 'use utf8' the characters do
display properly but the logger throws an error (found in the chat log
below) and doesn't log the message to file. Otherwise the messages log to
file just fine, but don't display properly in IRC.
Below is a short chat log about this issue from #poe on irc.perl.org
18:24:07 flasheh_ : Well then, I'm having issues with the Logger
Show quoted text
I hope I have provided enough information.
Thanks in advance.
Jens Heremans
>> plugin from poco-irc. It seems to mess up the
>
> character encoding because unicode chars don't
>> display properly when the plugin is enabled.
>
> 18:24:28 flasheh_ : I've been trying to figure this out for a while,
>> and I don't know why or how this is happening
>
> 18:24:43 dngor : To where is it logging?
>
> 18:25:38 flasheh_ : To a file. But the logs aren't the issue, it are
>> the actual messages sent to IRC that don't
>
> display properly
>
> 18:26:46 dngor : So when you turn on logging, things that you send
>> to channel get garbled, and when you turn
>
> off logging, they ungarble?
>
> 18:27:09 flasheh_ : pretty much
>
> 18:29:59 dngor : I see in its description that it does some
>> character set transcoding. That might be bleeding
>
> out into the rest of the program.
>
> 18:30:16 dngor : I don't see where it's decoding the text, though.
>
> 18:32:59 flasheh_ : Well, one thing I've found it that if I set 'use
>> utf8' the chars display fine but the logger
>
> plugin throws an error
>
> 18:33:04 flasheh_ : S_bot_public call on plugin 'Logger' failed:
>> Cannot decode string with wide characters at
>
>
>> /usr/lib64/perl5/site_perl/5.12.4/x86_64-linux/Encode.pm line 175.
>
> 18:35:30 dngor : I think this one needs to be reported as a bug.
>
>