I'm using joe 3.5 on FreeBSD 6.2. I often have
to edit texts that contain German umlauts, so
I set LC_CTYPE=de_DE.ISO8859-15. On the other
hand, I do not want German messages printed by
programs, instead I want the usual English
interfaces. So I do not set LC_MESSAGES or
any other LC_* or LANG variables, only LC_CTYPE
as explained above.
However, joe doesn't work correctly, it seems
to look only at LC_CTYPE in order to decide
that German messages should be used. Even if
I set LC_MESSAGES=C and LANG=C explicitely, it
is ignored. If I set LC_ALL=C, then English
messages are used, _but_ then the German umlaut
characters don't work correctly, because LC_ALL
overrides everything else, including LC_CTYPE.
I'm sorry I don't have a source code patch
ready for inclusion, but it shouldn't be hard
to fix the problem.
Summary: LC_CTYPE should be used for the type
of the character set. LC_MESSAGES should be
used for the message catalog, i.e. the language
of strings. If LANG is set, it should be used
as a default for other LC_* variables that are
not set. And if LC_ALL is set, it overrides
everything else, no matter if set or not.
Well, at least that's how it is documented in
the setlocale() manpage and in SUSv3/POSIX,
and all other programs behave like that. :-)