[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: xgettext outputs UTF-8 is --from-code=iso-8859-1

From: Bruno Haible
Subject: Re: xgettext outputs UTF-8 is --from-code=iso-8859-1
Date: Wed, 16 Mar 2005 16:58:57 +0100
User-agent: KMail/1.5

Laurent Martelli wrote:
> I have a string to translate which contains `×' (multiplication
> sign, 0xD7 in iso-88859-1).

In programming languages such as C or C++, you then have to make sure
that when the string has not been handled by the translator, and the user
is operating in a locale with different encoding (such as UTF-8),
you convert the string to the appropriate encoding. Otherwise the user
will see garbage on his screen.

A way to avoid this is to keep the strings in the source in ASCII,
and use an en.po file to convert the ASCII "x" to the multiplication sign.

> So I used --from-code=iso-8859-1 with
> xgettext, but as a consequence it now outputs UTF-8. And it does not
> understand --to-code. So it seems there's not way to get an iso-8859-1
> encoded po file in this case.

This is on purpose. The xgettext output is used as starting point for
the translators. But a Japanese or Russian translator cannot add her
translations to an ISO-8859-1 encoded file. So she would have to transcode
it to UTF-8 first before she can start working on it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]