[Python-3000] Help on text editors
"Martin v. Löwis"
martin at v.loewis.de
Tue Oct 3 11:47:42 CEST 2006
Antoine Pitrou schrieb:
> Ok, I hexdump'ed a few .mo files (the gettext-compatible files which
> contain translation strings) and the result is a bit funny:
> Gnome/KDE .mo files use utf-8, while .mo files for various command-line
> tools (e.g. aspell) use iso-8859-15.
This is a gettext feature: gettext .mo files contain their encoding,
so any file may use any encoding independent of the user's locale.
At run-time, gettext converts the .mo encoding into the user's encoding.
Typically, the selection of the encoding is the choice of the translator
performing the translation. In Germany, some translators now use UTF-8
for translations, as this supports the typographically correct
„quotation“. gettext will automatically transliterate these if the
locale does not support them.
So you shouldn't use the encoding of .mo files to infer some sort
More information about the Python-3000