Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: meir [...] guttman.co.il
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Log::Log4perl fails to initialized if configuration file in UTF-8 has a BOM
Date: Thu, 26 Apr 2012 21:00:47 +0300
To: bug-Log-Log4perl [...] rt.cpan.org
From: Meir Guttman <meir [...] guttman.co.il>
Dear Michael, I hope that unlike my previous bug "report", this one is truly a bug... I am afraid that a UTF-8 encoded configuration file for Log::Log4perl that starts with a "Byte-Order Marker" (BOM) generates an error as follows: Log::Log4perl configuration looks suspicious: No loggers defined at C:/Perl/site/lib/Log/Log4perl/Config.pm line 306. Just saving the very same file but without the BOM works fine. Regards, Meir Guttman
On Thu Apr 26 14:01:05 2012, meir@guttman.co.il wrote: Show quoted text
> I am afraid that a UTF-8 encoded configuration file for Log::Log4perl > that starts with a "Byte-Order Marker" (BOM) generates an error as > follows:
Sorry for the delay ... I've just added support for utf8-encoded configuration files, here's how to enable it: If your configuration file is encoded in utf-8 (which matters if you e.g. specify utf8-encoded appender filenames in it), then you need to tell Log4perl before running init(): use Log::Log4perl::Config; Log::Log4perl::Config->utf( 1 ); Log::Log4perl->init( ... ); Can you give it a try with the test (pre-1.37) tarball available here: https://github.com/mschilli/log4perl/tarball/utf8-config and let me know if it works with your utf8 encoded file? Thanks for your help. -- Mike
Subject: RE: [rt.cpan.org #76827] Log::Log4perl fails to initialized if configuration file in UTF-8 has a BOM
Date: Wed, 30 May 2012 13:35:48 +0300
To: bug-Log-Log4perl [...] rt.cpan.org
From: Meir Guttman <meir [...] guttman.co.il>
Show quoted text
> -----Original Message----- > From: Michael_Schilli via RT [mailto:bug-Log-Log4perl@rt.cpan.org] > Sent: Sunday, May 27, 2012 12:01 AM > To: meir@guttman.co.il > Subject: [rt.cpan.org #76827] Log::Log4perl fails to initialized if > configuration file in UTF-8 has a BOM >
Snip, snip ....... Show quoted text
> Can you give it a try with the test (pre-1.37) tarball available here: > > https://github.com/mschilli/log4perl/tarball/utf8-config > > and let me know if it works with your utf8 encoded file? Thanks for > your help. >
Dear Mike, Blush, blush, but I am too much of a newbie, using ActivePerl on a WinXP 32-bit box. I never "installed" a CPAN-like distribution other than with the ActiveState GUI PPM. I tried to use the command line 'PPM'. This failed issuing the following message: ppm install failed: No PPD found at https://github.com/mschilli/log4perl/tarball/utf8-config I also tried using the ActiveState 'CPAN' client. I obviously don't know what to do with it :( ... Can you help? Meir
On Wed May 30 06:36:13 2012, meir@guttman.co.il wrote: Show quoted text
> Blush, blush, but I am too much of a newbie, using ActivePerl on a > WinXP 32-bit box. I never "installed" a CPAN-like distribution > other than with the ActiveState GUI PPM.
As far as I know (but I could be wrong), ActivePerl can't install tarballs. I know that strawberryperl can (strawberryperl.com) install tarballs on Windows. Or any Linux-System you could try this on instead?
Subject: RE: [rt.cpan.org #76827] Log::Log4perl fails to initialized if configuration file in UTF-8 has a BOM
Date: Wed, 30 May 2012 20:19:28 +0300
To: bug-Log-Log4perl [...] rt.cpan.org
From: Meir Guttman <meir [...] guttman.co.il>
Show quoted text
> -----Original Message----- > From: Michael_Schilli via RT [mailto:bug-Log-Log4perl@rt.cpan.org] > Sent: Wednesday, May 30, 2012 6:41 PM > To: meir@guttman.co.il > Subject: [rt.cpan.org #76827] Log::Log4perl fails to initialized if > configuration file in UTF-8 has a BOM
Show quoted text
> As far as I know (but I could be wrong), ActivePerl can't install > tarballs. I know that strawberryperl can (strawberryperl.com) install > tarballs on Windows. Or any Linux-System you could try this on instead?
Dear Mike, Sorry, no Linux box is available to me, both physically and practice-wise. However, I eventually found and applied the procedure as outlined under the "CPAN" heading of http://jenda.krynicky.cz/perl/CPAN&ppm.html. The first step response was: Set up gcc environment - 3.4.5 (mingw-vista special r3) Checking if your kit is complete... Looks good Writing Makefile for Log::Log4perl Is that OK, or do I need to get and install 'gcc'? (I couldn't find any 'c' code in your distribution.) Anyway, I just continued and the rest of the steps seemed to work. I modified my program as instructed using the "Log::Log4perl::Config->utf( 1 );" construct. I then "saved-as" my configuration file adding a BOM. Mind you, that is the *only* UTF-8 part of the configuration file. Now the program runs fine with the BOM-ed configuration file. Thanks! Meir
Subject: RE: [rt.cpan.org #76827] Log::Log4perl fails to initialized if configuration file in UTF-8 has a BOM
Date: Wed, 30 May 2012 20:39:16 +0300
To: bug-Log-Log4perl [...] rt.cpan.org
From: Meir Guttman <meir [...] guttman.co.il>
Ah Mike, I just saw that "our $VERSION" is still '1.36'! FYI... Meir
Just pushed 1.37 to CPAN, should be at your mirror within a couple of hours. Enjoy! -- Mike