Skip Menu |

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

Report information
The Basics
Id: 40009
Status: resolved
Worked: 3 hours (180 min)
Priority: 0/
Queue: Locale-PO

People
Owner: cosimo [...] cpan.org
Requestors: Nikolai.Kondrashov [...] oktetlabs.ru
Cc:
AdminCc:

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



Subject: Incorrect handling of multi-line obsolete entries
Date: Mon, 13 Oct 2008 17:56:49 +0400
To: bug-Locale-PO [...] rt.cpan.org
From: Nikolai Kondrashov <Nikolai.Kondrashov [...] oktetlabs.ru>
Hello. Latest Locale::PO (0.21) handles multi-line obsolete entries incorrectly. It puts "#~ " markers in the msgid/msgstr, which results in data corruption. Below is a patch, which fixes it: ---:<--- --- a/PO.pm 2008-05-19 20:21:50.000000000 +0400 +++ b/PO.pm 2008-10-13 17:44:12.000000000 +0400 @@ -426,10 +426,10 @@ $buffer{msgstr_n}{$1} = $self->dequote($2); $last_buffer = \$buffer{msgstr_n}{$1}; } - elsif (/^(?:#~\s+)?"/) { + elsif (/^(?:#~\s+)?(".*)/) { # contined string - $$last_buffer .= $self->dequote($_); + $$last_buffer .= $self->dequote($1); } else { warn "Strange line at $file line $line_number: $_\n"; --->:--- Thank you for a wonderful module :)! If only it was a bit faster :) Sincerely, Nick
RT-Send-CC: modules [...] perl.org
Yay! Fixed after 4 years :-) Going to release 0.22 on CPAN soon. Thanks to brian d foy for handing out co-maintainership.