From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Autogen in Emacs Shell Date: Fri, 01 May 2015 20:49:52 +0300 Message-ID: <83sibgqjb3.fsf@gnu.org> References: <83twvzszjv.fsf@gnu.org> <20150501092657.GA19316@tuxteam.de> <20150501150340.GB30776@tuxteam.de> NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1430502629 15699 80.91.229.3 (1 May 2015 17:50:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 May 2015 17:50:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri May 01 19:50:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YoF4y-0001hM-BC for geh-help-gnu-emacs@m.gmane.org; Fri, 01 May 2015 19:50:24 +0200 Original-Received: from localhost ([::1]:54978 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoF4x-0004eJ-QK for geh-help-gnu-emacs@m.gmane.org; Fri, 01 May 2015 13:50:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoF4n-0004e3-0X for help-gnu-emacs@gnu.org; Fri, 01 May 2015 13:50:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoF4j-0002IT-0I for help-gnu-emacs@gnu.org; Fri, 01 May 2015 13:50:12 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:53091) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoF4i-0002Gh-Jk for help-gnu-emacs@gnu.org; Fri, 01 May 2015 13:50:08 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NNO00100MGFNP00@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Fri, 01 May 2015 20:50:06 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NNO00103MVIP710@a-mtaout20.012.net.il> for help-gnu-emacs@gnu.org; Fri, 01 May 2015 20:50:06 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104141 Archived-At: > Date: Fri, 1 May 2015 19:06:09 +0200 > From: Alexander Shukaev > Cc: help-gnu-emacs , Eli Zaretskii > > Right, so explicitly doing > > (setenv "LANG" "en_US.UTF-8") > > solves both problems at once. Interesting... Do you have any comments on that? > Maybe clarifications on why this problem occurs? For instance, why `LANG' is > properly set in ConEmu, while in Emacs it has value `ENU'? Because the Windows locale names are different from Posix locale names. > Where does this even come from? >From w32.c:init_environment: /* Get default locale info and use it for LANG. */ if (GetLocaleInfo (LOCALE_USER_DEFAULT, LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP, locale_name, sizeof (locale_name))) { for (i = 0; i < N_ENV_VARS; i++) { if (strcmp (env_vars[i].name, "LANG") == 0) { env_vars[i].def_value = locale_name; break; } } } > Is it OK to do > > (setenv "LANG" "en_US.UTF-8") Not if you want the rest of locale-specific code in Emacs itself to work, no. Why does a native Windows program such as bsdtar expect a Posix-style locale spec? It's a bug, IMO. The MS-Windows implementation of 'setlocale' will not work with Posix locale specs. > or there is some other more generic way? There's no generic way. Locale names and specifications are not portable between Posix and non-Posix systems.