With a latin1 master document, I'm using the following commands:
po4a-gettextize -f man -m test.1 -M ISO-8859-1 -p test.po
po4a-translate -f man -m test.1 -M ISO-8859-1 -p test.po -l test.fr -k 0
The generated test.po is OK
The generated test.fr is not OK. If I translate the non ascii string
with only ascii char, the same non valid string is output.
I could also reproduce this with 0.19.
I also tried with various -L encoding, without success.
With an UTF-8 master document (and changing the -M option to UTF-8), I
have the same issues, but with 0.19, the output string is OK if it is
translated in the PO (whether or not the translated string contain non
any ascii char).
I may have just messed up something. Can somebody try it?
(I did verify the master document encoding, this time;)
Show replies by date
I think I've got it:
The input charset in latin1, the po charset is UTF-8.
Po.pm::gettext tries to find a latin1 string in the PO, and fails. It then
directly prints the latin1 string in the output document (probably with an
additional UTF-8 to UTF-8 re-encoding).
Here is a patch. A review is welcome.
I don't commit it right known, Alioth has some troubles.