Skip Menu |

This queue is for tickets about the Log-Log4perl CPAN distribution.

Report information
The Basics
Id: 36673
Status: resolved
Priority: 0/
Queue: Log-Log4perl

People
Owner: Nobody in particular
Requestors: shantanu.bhadoria [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in:
  • 1.00
  • 1.01
  • 1.02
  • 1.03
  • 1.04
  • 1.05
  • 1.06
  • 1.07
  • 1.08
  • 1.09
  • 1.10
  • 1.11
  • 1.12
  • 1.13
  • 1.14
  • 1.15
  • 1.16
Fixed in: (no value)



Subject: Support for utf-8 in Log::Log4perl::Appender::Screen
Hi, win32 console doesn't support utf-8 by default hence we have to explicitly specify binmode for STDOUT and STDERR to :utf8. ( I am not sure if this is a issue on other platforms. ) I made the modifications in "Log::Log4perl::Appender::Screen" and have attached the modified module file and the dif against original that resolves this problem. platform : activestate perl v 5.8.7 build 815 on windows XP sp2. Error : "Wide character in print at C:/Perl/site/lib/Log/Log4perl/Appender/Screen.pm line 28." Regards, Shantanu Bhadoria http://www.shantanubhadoria.com
Subject: screen.pm.diff
--- C:\Documents and Settings\sbhadoria\Desktop\Screen_new.pm +++ C:\Documents and Settings\sbhadoria\Desktop\Screen.pm @@ -1,6 +1,8 @@ ################################################## package Log::Log4perl::Appender::Screen; ################################################## + +our @ISA = qw(Log::Log4perl::Appender); use warnings; use strict; @@ -13,7 +15,6 @@ my $self = { name => "unknown name", stderr => 1, - utf8 => undef, @options, }; @@ -24,12 +25,7 @@ sub log { ################################################## my($self, %params) = @_; - - if (defined $self->{utf8}) { - binmode STDERR, ":utf8"; - binmode STDOUT, ":utf8"; - } - + if($self->{stderr}) { print STDERR $params{message}; } else {
Resolved in 1.12, thanks!
On Wed May 13 03:30:39 2009, MSCHILLI wrote: Show quoted text
> Resolved in 1.12, thanks!
I meant to say 1.23 :)