emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs fails to use default locale


From: Jan Djärv
Subject: Re: Emacs fails to use default locale
Date: Fri, 27 Nov 2009 16:49:23 +0100
User-agent: Thunderbird 2.0.0.23 (X11/20090817)

Ken Brown skrev:
According to

  http://www.opengroup.org/onlinepubs/007908799/xbd/envvar.html

if LC_ALL, LC_CTYPE, and LANG are all either unset or empty, then the implementation-dependent default locale is supposed to be used. My understanding is that this should be done by using setlocale(LC_CTYPE, ""). But emacs's locale initialization seems to just use the environment variables, so it doesn't pick up the default locale if the variables are unset.


setlocale(LC_ALL, "") is the way.  Emacs does that if LC_ALL is unset or not 
"C".

However, because of internal reasons, Emacs also does:
  /* The Emacs Lisp reader needs LC_NUMERIC to be "C",
     so that numbers are read and printed properly for Emacs Lisp.  */
  setlocale (LC_NUMERIC, "C");

Can you describe in more detail the problem you are seeing? I.e. what output is wrong?

        Jan D.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]