[Po4a-commits] "po4a/lib/Locale/Po4a Man.pm,1.186,1.187"

Nicolas FRANCOIS nekral-guest at alioth.debian.org
Tue Sep 5 20:26:20 UTC 2006


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

Modified Files:
	Man.pm 
Log Message:
? was considered as a non breaking space. Activate the detection of
failing Encode::from_to().  Thanks to KISE Hiroshi for pointing it.


Index: Man.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/Man.pm,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -d -r1.186 -r1.187
--- Man.pm	28 Aug 2006 18:00:30 -0000	1.186
+++ Man.pm	5 Sep 2006 20:26:18 -0000	1.187
@@ -931,8 +931,10 @@
 
     # Change ascii non-breaking space to groff one
     my $nbs_out = "\xA0";
-    my $enc_length = Encode::from_to($nbs_out, "latin1",
-                                               $self->get_out_charset);
+    my $enc_length;
+    eval("\$enc_length = Encode::from_to(\$nbs_out, \"latin1\",
+                                         \$self->get_out_charset,
+                                         1)");
     $str =~ s/\Q$nbs_out/\\ /sg if defined $enc_length;
     # No nbsp (said "\ " in groff on the last pos of the line, or groff adds
     # an extra space
@@ -1111,8 +1113,9 @@
     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'});
+        eval ("\$enc_length = Encode::from_to(\$nbs, \"latin-1\",
+                                              \$self->{TT}{'file_in_charset'},
+                                              1)");
     }
     # fall back solution
     $nbs = "PO4A:VERY_IMPROBABLE_STRING_USEDFOR_NON-BREAKING-SPACES"




More information about the Po4a-commits mailing list