r526 - trunk/misc

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Feb 29 07:01:34 EST 2008


Author: icculus
Date: 2008-02-29 07:01:31 -0500 (Fri, 29 Feb 2008)
New Revision: 526

Modified:
   trunk/misc/po2localization.pl
Log:
Handle UTF-8 correctly.


Modified: trunk/misc/po2localization.pl
===================================================================
--- trunk/misc/po2localization.pl	2008-02-29 11:56:26 UTC (rev 525)
+++ trunk/misc/po2localization.pl	2008-02-29 12:01:31 UTC (rev 526)
@@ -38,6 +38,7 @@
     my $currentlang = '';
 
     while (<POIO>) {
+        utf8::decode($_);
         chomp;
         s/\A\s+//;
         s/\s+\Z//;
@@ -57,6 +58,7 @@
         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//;
@@ -81,6 +83,7 @@
                 my $msgstr = '';
                 my $msgid = $_;
                 while (<POIO>) {   # check for multiline msgid strings.
+                    utf8::decode($_);
                     chomp;
                     s/\A\s+//;
                     s/\s+\Z//;
@@ -95,6 +98,7 @@
                     }
                 }
                 while (<POIO>) {   # check for multiline msgstr strings.
+                    utf8::decode($_);
                     chomp;
                     s/\A\s+//;
                     s/\s+\Z//;




More information about the mojosetup-commits mailing list