From: Ken Brown <kbrown@cornell.edu>
To: "Jan Djärv" <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: Emacs fails to use default locale
Date: Sat, 28 Nov 2009 10:20:35 -0500 [thread overview]
Message-ID: <4B113FC3.2060203@cornell.edu> (raw)
In-Reply-To: <4B101541.8000300@cornell.edu>
On 11/27/2009 1:06 PM, Ken Brown wrote:
> On 11/27/2009 10:49 AM, Jan Djärv wrote:
>> 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?
>
> I'm working in Cygwin 1.7, which has recently adopted a default locale
> that uses UTF-8 encoding. If I start emacs with none of the locale
> variables set, emacs appears to assume an ASCII character set. (I don't
> see "U" in the mode line, for instance.) Moreover, C-h C returns the
> error message "Unknown button type `help-xref'".
>
> When I referred to emacs's locale initialization in my original post, I
> was referring to the code in lisp/international/mule-cmds.el.
Maybe the problem (or at least part of the problem) is that mule-cmds.el
doesn't call (locale-info 'codeset) when the CODESET can't be determined
from environment variables.
Ken
prev parent reply other threads:[~2009-11-28 15:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-25 19:08 Emacs fails to use default locale Ken Brown
2009-11-27 15:49 ` Jan Djärv
2009-11-27 18:06 ` Ken Brown
2009-11-28 15:20 ` Ken Brown [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B113FC3.2060203@cornell.edu \
--to=kbrown@cornell.edu \
--cc=emacs-devel@gnu.org \
--cc=jan.h.d@swipnet.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.