Sat Jul 27 11:03:43 2013jfesler [...] gigo.com - Ticket created
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?
Tue Aug 13 14:41:29 2013cosimo [...] streppone.it - Correspondence added
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.
Tue Aug 13 14:41:29 2013The RT System itself - Status changed from 'new' to 'open'
Thu Mar 27 01:25:15 2014Jeff.Fearn [...] gmail.com - Correspondence added
No need for a regex, just use chomp instead of chop.
Sun Dec 14 08:08:34 2014cosimo [...] cpan.org - Correspondence added
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.
Sun Dec 14 08:08:35 2014cosimo [...] cpan.org - Status changed from 'open' to 'resolved'