Hi,
in attachment is patch to po/ui-backport.pl script which takes care about
charset in po/*.po files and makes corresponding changes in target
po/user/wp/*.strings files.
Bye.
Radek Vybiral
Common subdirectories: po/CVS and po.new/CVS
diff -u po/ui-backport.pl po.new/ui-backport.pl
--- po/ui-backport.pl Wed Feb 6 16:17:18 2002
+++ po.new/ui-backport.pl Wed Feb 6 19:46:40 2002
@@ -35,6 +35,7 @@
my $tag;
my $str;
my $cont = "0";
+my $encoding = "iso-8859-1";
$lang =~ s/_/-/g;
@@ -44,8 +45,15 @@
open FILE, ">../user/wp/strings/$lang.strings";
+open (IN, "<$lang.po") || die "can't open $lang.po: $!";
+
+while (<IN>) {
+ $encoding = $1 if (/\"Content-Type:\s+text\/plain;\s+charset=(.*)\\n\"/);
+ last if (/Content-Transfer-Encoding/);
+}
+
print FILE
-"<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n".
+"<?xml version=\"1.0\" encoding=\"$encoding\"?>\n".
"<!-- ============================================================== -->\n".
"<!-- This file contains AbiWord Strings. AbiWord is an Open Source -->\n".
"<!-- word processor developed by AbiSource, Inc. Information about -->\n".
@@ -54,12 +62,6 @@
"<!-- This file is covered by the GNU Public License (GPL). -->\n".
"<!-- ============================================================== -->\n\n".
"<AbiStrings app=\"AbiWord\" ver=\"1.0\" language=\"$lang\">\n\n";
-
-open (IN, "<$lang.po") || die "can't open $lang.po: $!";
-
-while (<IN>) {
- last if (/Content-Transfer-Encoding/);
-}
while (<IN>) {
if ($cont == "1") {