[Po4a-commits] po4a/lib/Locale/Po4a LaTeX.pm,1.6,1.7 Man.pm,1.89,1.90

Nicolas FRANCOIS po4a-devel@lists.alioth.debian.org
Sun, 24 Apr 2005 01:09:26 +0000


Update of /cvsroot/po4a/po4a/lib/Locale/Po4a
In directory haydn:/tmp/cvs-serv10300/lib/Locale/Po4a

Modified Files:
	LaTeX.pm Man.pm 
Log Message:
Fix some issues triggered by the testsuite.


Index: LaTeX.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/LaTeX.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- LaTeX.pm	8 Apr 2005 23:56:28 -0000	1.6
+++ LaTeX.pm	24 Apr 2005 01:09:24 -0000	1.7
@@ -147,7 +147,7 @@
 register_generic("*frame,0,1,,1");
 register_generic("*framebox,2,1,,1");         # There is another form in picture environment
 register_generic("*hspace,1,1,,");
-register_generic("*hyphenation,0,1,,1");       # Translators may wish to add/remove words
+register_generic("*hyphenation,0,1,,1");      # Translators may wish to add/remove words
 register_generic("include,0,1,,");            # file
 #register_generic("includeonly,0,1,,");       # should not be supported for now
 register_generic("input,0,1,,");              # file

Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- Man.pm	23 Apr 2005 17:45:36 -0000	1.89
+++ Man.pm	24 Apr 2005 01:09:24 -0000	1.90
@@ -744,10 +744,15 @@
 
     # change the non-breaking space according to the input document charset
     $nbs = "\xA0";
-    my $enc_length = Encode::from_to($nbs, "latin-1",
+    my $enc_length;
+    if (defined $self->{TT}{'file_in_charset'} and
+        length $self->{TT}{'file_in_charset'})
+    {
+        $enc_length = Encode::from_to($nbs, "latin-1",
                                            $self->{TT}{'file_in_charset'});
+    }
     # fall back solution
-    $nbs = "PO4A:VERY_IMPROBABLE_STRING_USEDFOR_NON-BREAKING-SPACES";
+    $nbs = "PO4A:VERY_IMPROBABLE_STRING_USEDFOR_NON-BREAKING-SPACES"
         unless defined $enc_length;
 
   LINE: