Subject: | "\n" in a string not escaped properly |
Given this code:
#####
use Locale::PO;
my $str =<<'EOT';
foo \n pants
go
EOT
my $po = new Locale::PO();
my $test = $po->msgid($str);
print("test: $test", "\n");
# looks right ..
print($po->dump());
# but it's not wrapped up correctly :(
#####
It prints out:
test: "foo \n pants
go
"
msgid ""
"\"foo \n"
" pants
go
\""
I was expecting dump to output :
msgid ""
"foo \\n pants\n"
"\n"
"go\n"
"\n"
I have a patch for this and will submit a pull request on github.
Cheers, Jeff.