[Po4a-commits] po4a/lib/Locale/Po4a TransTractor.pm,1.61,1.62

Nicolas FRAN??OIS po4a-devel@lists.alioth.debian.org
Mon, 14 Mar 2005 18:39:41 +0000


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

Modified Files:
	TransTractor.pm 
Log Message:
Encode strings into the PO charset before searching in the PO file.


Index: TransTractor.pm
===================================================================
RCS file: /cvsroot/po4a/po4a/lib/Locale/Po4a/TransTractor.pm,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- TransTractor.pm	5 Mar 2005 18:12:35 -0000	1.61
+++ TransTractor.pm	14 Mar 2005 18:39:38 -0000	1.62
@@ -822,6 +822,10 @@
 	}
     }
 
+    if ($self->{TT}{po_in}->get_charset ne "CHARSET") {
+	Encode::from_to($string, $in_charset, $self->{TT}{po_in}->get_charset);
+    }
+
     my $transstring = $self->{TT}{po_in}->gettext($string,
 					'wrap'      => $options{'wrap'}||0,
 					'wrapcol'   => $options{'wrapcol'});