[Po4a-commits] po4a po4a-normalize,1.17,1.18

Jordi Vilalta po4a-devel@lists.alioth.debian.org
Sat, 06 Nov 2004 09:29:03 +0000


Update of /cvsroot/po4a/po4a
In directory haydn:/tmp/cvs-serv26756

Modified Files:
	po4a-normalize 
Log Message:
Added the -M option to po4a-normalize


Index: po4a-normalize
===================================================================
RCS file: /cvsroot/po4a/po4a/po4a-normalize,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- po4a-normalize	19 Jul 2004 10:21:12 -0000	1.17
+++ po4a-normalize	6 Nov 2004 09:29:01 -0000	1.18
@@ -56,6 +56,10 @@
 Format type of the documentation you want to handle. Use the --help-format
 option to see the list of available formats.
 
+=item -M, --master-charset
+
+Charset of the file containing the document to translate.
+
 =item -V, --version
 
 Displays the version of the script and exits.
@@ -110,12 +114,15 @@
 }
 
 my ($help_fmt,$help,$type,$debug,$verbose,@options);
+my ($mastchar);
 Getopt::Long::Configure('no_auto_abbrev','no_ignore_case');
 GetOptions(
         'help|h'       => \$help,
 	'help-format'  => \$help_fmt,
         'format|f=s'   => \$type,
-    
+
+	'master-charset|M=s'    => \$mastchar,
+
         'option|o=s'    => \@options,
 
         'verbose|v'   => \$verbose,
@@ -144,6 +151,8 @@
 -e $filename || die sprintf(gettext("File %s does not exist."),$filename)."\n";
 
 $parser->read($filename);
+$parser->{TT}{utf_mode} = 1;
+$parser->{TT}{file_in_charset} = $mastchar;
 $parser->parse();
 $parser->write('po4a-normalize.output');
 $parser->writepo('po4a-normalize.po');