zsh-workers
 help / color / mirror / code / Atom feed
* zsh-2.6.b19: handling of locale probably wrong?
@ 1996-06-06  8:46 Andrej Borsenkow
  0 siblings, 0 replies; only message in thread
From: Andrej Borsenkow @ 1996-06-06  8:46 UTC (permalink / raw)
  To: zsh-workers

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@sni.de
-------------------------------------------------------------------------




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-06-06  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-06  8:46 zsh-2.6.b19: handling of locale probably wrong? Andrej Borsenkow

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).