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

XPG4 message catalog system -- Locale directories independent of encoding?



Hi,

I have a few questions about the XPG4 related message catalog system
(catopen(3), catgets(3), ...).

I have support for the following locales in my system:

$ locale -a
C
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
de_DE.utf8@euro
deutsch
german
POSIX
ru_RU.utf8

But there exists only a single locale directory for German:
/usr/share/locale/de
(apart from de_AT), no de_DE.utf8, de_DE.iso88591, ...

I found the file "charset" in it which contains "utf-8". I'm sure such a
single directory is sufficient for gettext but what about catopen,
catgets, ...?

See
http://macromates.com/sigpipe/archives/2006/04/20/message-catalogs-on-darwin/
for an introduction to this localisation system.

As far as I know message catalogs created via gencat do not contain the
encoding and perform encoding transformation based on files
/usr/share/.msg_conv-* files (according to
http://www.uwm.edu/cgi-bin/IMT/wwwman?topic=catopen(3)&msection=).

I ask because of #397482
"fluxbox: ru_RU.UTF-8 (default russian locale in 'Etch') bug"
which affects also other languages and probably also further packages.

Do all locale settings use UTF-8 per default so that it is indeed save
to store all catgets related messages in UTF-8 and to just call iconv
on catgets return values in the program?

strace reports that catopen looks only into
/usr/share/locale/de_DE.UTF-8/
/usr/share/locale/de/
(for de_DE.UTF-8 locale) and
/usr/share/locale/de_DE.iso885915@euro
/usr/share/locale/de/
(for de_DE.iso885915@euro locale), so it always opens a file independent
of the codeset.

What about the "$ codeset=ISO-8859-15" statement in
fluxbox-0.9.14/nls/de_DE/Translation.m, it isn't documented somewhere
and seems to be ignored.

PS: Why does locale report a "de_DE.UTF-8" locale if locale -a reports
de_DE.utf8?

Jens



Reply to: