[Po4a-commits] "po4a/lib/Locale/Po4a Pod.pm, 1.23, 1.24 TransTractor.pm, 1.114, 1.115"

Nicolas FRANÇOIS nekral-guest at alioth.debian.org
Sun Nov 22 21:02:02 UTC 2009


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

Modified Files:
	Pod.pm TransTractor.pm 
Log Message:
	* lib/Locale/Po4a/Pod.pm, lib/Locale/Po4a/TransTractor.pm:
	Improved detection of the output charset to provide the
	'=encoding' line in the output POD.
	* t/data-04/text-iso8859.pod-ok, t/data-04/utf.pod-ok: Updated
	testsuite accordingly.


Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.114
retrieving revision 1.115
diff -u -d -r1.114 -r1.115
--- TransTractor.pm	12 Nov 2009 20:24:06 -0000	1.114
+++ TransTractor.pm	22 Nov 2009 21:02:00 -0000	1.115
@@ -15,7 +15,7 @@
 @ISA = qw(DynaLoader);
 @EXPORT = qw(new process translate 
              read write readpo writepo
-             getpoout setpoout);
+             getpoout setpoout get_out_charset);
 
 # Try to use a C extension if present.
 eval("bootstrap Locale::Po4a::TransTractor $VERSION");

Index: Pod.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Pod.pm,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- Pod.pm	23 Mar 2009 20:43:50 -0000	1.23
+++ Pod.pm	22 Nov 2009 21:01:59 -0000	1.24
@@ -13,7 +13,7 @@
 ############################################################################
 
 use Pod::Parser;
-use Locale::Po4a::TransTractor qw(process new);
+use Locale::Po4a::TransTractor qw(process new get_out_charset);
 
 package Locale::Po4a::Pod;
 
@@ -146,8 +146,10 @@
 
 sub docheader {
     my $self=shift;
-    my $encoding = $self->{TT}{file_out_charset};
-    if (defined $encoding and length $encoding) {
+    my $encoding = $self->get_out_charset();
+    if (    (defined $encoding)
+        and (length $encoding)
+        and ($encoding ne "ascii")) {
         $encoding = "\n=encoding $encoding\n";
     } else {
         $encoding = "";




More information about the Po4a-commits mailing list