Skip Menu |

This queue is for tickets about the Locale-PO CPAN distribution.

Report information
The Basics
Id: 87374
Status: resolved
Priority: 0/
Queue: Locale-PO

People
Owner: Nobody in particular
Requestors: jfesler [...] gigo.com
Cc:
AdminCc:

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



Subject: \r\n not handled reading .po files
Date: Sat, 27 Jul 2013 17:03:30 +0200
To: bug-Locale-PO [...] rt.cpan.org
From: Jason Fesler <jfesler [...] gigo.com>
I have a file written with \r\n . When reading with Local::PO, it is not being recognized, unless I first rewrite the file into unix format. while (<IN>) { chop; $line_number++; if (/^$/) { Would you consider something such as.. s/[\r\n]+$//; instead of chop?
Subject: Re: [rt.cpan.org #87374] \r\n not handled reading .po files
Date: Tue, 13 Aug 2013 20:41:11 +0200
To: Jason Fesler via RT <bug-Locale-PO [...] rt.cpan.org>
From: Cosimo Streppone <cosimo [...] streppone.it>
I think that would be a good idea.
No need for a regex, just use chomp instead of chop.
Just released 0.25 to CPAN (allow one/two hours for it to be live). This release should handle every sort of newline combination. I tested it on MSWin32, msys and Linux. FTR, chomp() doesn't seem to be enough. Jason's suggestion is what I believe works most reliably, also when it comes to cross-platform interoperability of the produced PO files.