[Python-Dev] Re: gettext in the standard library

Martin von Loewis loewis@informatik.hu-berlin.de
Mon, 21 Aug 2000 12:25:01 +0200 (MET DST)


> So you're all for the two different API version ? After some
> more thinking, I think I agree. The reason is that the lookup
> itself will have to be Unicode-aware too:
>=20
> gettext.unigettext(u"L=F6schen") would have to convert u"L=F6schen"
> to UTF-8, then look this up and convert the returned value
> back to Unicode.

I did not even think of using Unicode as *keys* to the lookup. The GNU
translation project recommends that message in the source code are in
English. This is good advice, as translators producing, say, Japanese
translation like have more problems with German input than with
English one.

So I'd say that message ids can safely be byte strings, especially as
I believe that the gettext tools treat them that way, as well. If
authors really have to put non-ASCII into message ids, they should use
\x escapes. I have never seen such a message, though (and I have
translated a number of message catalogs).

Regards,
Martin