Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zsh-2.6.b19: handling of locale probably wrong?
- X-seq: zsh-workers 1272
- From: Andrej Borsenkow <borsenkow.msk@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: zsh-2.6.b19: handling of locale probably wrong?
- Date: Thu, 6 Jun 1996 12:46:10 +0400 (MOW)
- Reply-to: borsenkow.msk@xxxxxx
I just started to work with zsh, and already am fond of it. However, one
small problem:
zsh is using value of LANG to set locale (langsetfn()). It means, that as
long as zsh sees LANG it sets *complete* locale to the value of LANG.
I don't have standards at hand, but according to man pages on our system
(and as far as I know it is consistent with XPG and POSIX) the locale is
set to the value of (in decreasing precedence);
LC_ALL
LC_CTYPE, LC_MESSAGES, LC_COLLATE, ...
LC_LANG.
that is, if LC_ALL is set, it overrides any other settings;
if any category is set, it overrides value of LANG;
otherweise use value of LANG.
My problem is, I (and many others as well) using LANG=english and
LC_CTYPE, LC_COLLATE=russian. So I get messages, dates, times and so on in
english, which I prefer, while still have correct character handling.
zsh sets it correct at first (setlocale(LC_ALL,"")), but it seems that
after it sees LANG, it resets the *complete* locale to english
(setlocale(LC_ALL,<value of LANG>) in langsetfn()), LC_CTYPE and
LC_COLLATE including.
Probably, it wouldn't be so bad idea to implement correct hadling of it?
That is, check for existence of LC_ALL and LC_* befor setting LANG?
I am not so nuch deep in sources; but if you tell, how to check for the
variable value (and get it) I could make the patches.
thanks in advance
-------------------------------------------------------------------------
Andrej Borsenkow Fax: +7 (095) 252 01 05
SNI ITS Moscow Tel: +7 (095) 252 13 88
NERV: borsenkow.msk E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------
Messages sorted by:
Reverse Date,
Date,
Thread,
Author