r532 - trunk/misc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Feb 29 23:13:51 EST 2008
Author: icculus
Date: 2008-02-29 23:13:51 -0500 (Fri, 29 Feb 2008)
New Revision: 532
Modified:
trunk/misc/po2localization.pl
Log:
Better UTF-8 fix for po2localization.pl ...
Modified: trunk/misc/po2localization.pl
===================================================================
--- trunk/misc/po2localization.pl 2008-02-29 23:15:02 UTC (rev 531)
+++ trunk/misc/po2localization.pl 2008-03-01 04:13:51 UTC (rev 532)
@@ -30,6 +30,7 @@
my $template = /\.pot\Z/;
open(POIO, '<', $fname) or die("Failed to open $_: $!\n");
+ binmode(POIO, ":utf8");
if ($template) {
die("multiple .pot files specified\n") if ($saw_template);
@@ -40,7 +41,6 @@
my $currentlang = '';
while (<POIO>) {
- utf8::decode($_);
chomp;
s/\A\s+//;
s/\s+\Z//;
@@ -60,7 +60,6 @@
if (s/msgid\s*\"(.*?)\"\Z/$1/) {
if ($_ eq '') { # initial string.
while (<POIO>) { # Skip most of the metadata.
- utf8::decode($_);
chomp;
s/\A\s+//;
s/\s+\Z//;
@@ -87,7 +86,6 @@
my $msgstr = '';
my $msgid = $_;
while (<POIO>) { # check for multiline msgid strings.
- utf8::decode($_);
chomp;
s/\A\s+//;
s/\s+\Z//;
@@ -102,7 +100,6 @@
}
}
while (<POIO>) { # check for multiline msgstr strings.
- utf8::decode($_);
chomp;
s/\A\s+//;
s/\s+\Z//;
More information about the mojosetup-commits
mailing list