[Po4a-commits] "po4a/lib/Locale/Po4a Pod.pm,1.25,1.26"

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sun Dec 27 03:43:54 UTC 2009


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory alioth:/tmp/cvs-serv3702/lib/Locale/Po4a

Modified Files:
	Pod.pm 
Log Message:
	* NEWS, lib/Locale/Po4a/Pod.pm: Detect the encoding based on the
	input's =encoding line.


Index: Pod.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Pod.pm,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- Pod.pm	27 Dec 2009 01:16:03 -0000	1.25
+++ Pod.pm	27 Dec 2009 03:43:52 -0000	1.26
@@ -77,6 +77,11 @@
 	$self->pushline("=$command\n\n");
     } elsif ($command eq 'over') {
 	$self->pushline("=$command $paragraph".(length($paragraph)?"":"\n\n"));
+    } elsif ($command eq 'encoding') {
+	my $charset = $paragraph;
+	$charset =~ s/^\s*(.*?)\s*$/$1/s;
+	$self->detected_charset($charset)
+	# The =encoding line will be added by docheader
     } else {
 	$paragraph=$self->translate($paragraph,
 				    $self->input_file().":$line_num",
@@ -151,10 +156,8 @@
         and (length $encoding)
         and ($encoding ne "ascii")) {
         $encoding = "\n=encoding $encoding\n";
-# FIXME: Remove any old =encoding specification
     } else {
         $encoding = "";
-# FIXME: Keep any old =encoding specification?
     }
 
     return <<EOT;




More information about the Po4a-commits mailing list