From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Random832 Newsgroups: gmane.emacs.bugs Subject: bug#22392: 25.0.50; NS Emacs run from OS X GUI doesn't set locale Date: Mon, 18 Jan 2016 17:09:02 -0500 Message-ID: <1453154942.1231266.495690338.5BC96C7B@webmail.messagingengine.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1453165969 11559 80.91.229.3 (19 Jan 2016 01:12:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 19 Jan 2016 01:12:49 +0000 (UTC) Cc: 22392@debbugs.gnu.org To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 19 02:12:34 2016 Return-path: Envelope-to: geb-bug-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 1aLKqX-0008Vv-Se for geb-bug-gnu-emacs@m.gmane.org; Tue, 19 Jan 2016 02:12:34 +0100 Original-Received: from localhost ([::1]:34389 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLKqX-0007Sh-4j for geb-bug-gnu-emacs@m.gmane.org; Mon, 18 Jan 2016 20:12:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:45177) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLHzy-0001w0-W7 for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2016 17:10:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aLHzu-0002kd-5L for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2016 17:10:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aLHzt-0002jg-RZ for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2016 17:10:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aLHzt-0002aB-Mh for bug-gnu-emacs@gnu.org; Mon, 18 Jan 2016 17:10:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Random832 Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 18 Jan 2016 22:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22392 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22392-submit@debbugs.gnu.org id=B22392.14531549479858 (code B ref 22392); Mon, 18 Jan 2016 22:10:01 +0000 Original-Received: (at 22392) by debbugs.gnu.org; 18 Jan 2016 22:09:07 +0000 Original-Received: from localhost ([127.0.0.1]:53236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLHz1-0002Yv-2E for submit@debbugs.gnu.org; Mon, 18 Jan 2016 17:09:07 -0500 Original-Received: from out5-smtp.messagingengine.com ([66.111.4.29]:40686) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aLHyz-0002Yn-4W for 22392@debbugs.gnu.org; Mon, 18 Jan 2016 17:09:05 -0500 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 25E4F2080E for <22392@debbugs.gnu.org>; Mon, 18 Jan 2016 17:09:03 -0500 (EST) Original-Received: from web1 ([10.202.2.211]) by compute6.internal (MEProxy); Mon, 18 Jan 2016 17:09:03 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=HFlNgXjKU+FLxVDttGWkeJrkgig=; b=3hFtAS USCP8vSG7v4wasp8WR0DvfnmfLuM5Hp6u8oFCvaf/kUKjWh6t1B1e4P+3mUWzZr4 o3s2U1EfqHHJG+8E7AVzeSk+DSVJhdL72achcJI9PMhJHonypHDZIpdol0a4SeV1 XgYyphWnXy0r4QZuuu7ZZgu7Pqw4sBxyDmhOg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=HFlNgXjKU+FLxVD ttGWkeJrkgig=; b=hGvm50uuDcYeBKSBBXtBmd69whV2x86/7gCuwBe/3w0atFR 9j6+BbgWXnMQRmXoFCoVWikkK6sgytOBJZ6UQrQWw1qXeBrPCgXGJZiihZx8ggYR aPAS0lsm+jfeM+Xv0TquphKi9QMaZVSyKcSMoyV5bpvINYsEwudjfi3wQ5uE= Original-Received: by web1.nyi.internal (Postfix, from userid 99) id EF163AF2697; Mon, 18 Jan 2016 17:09:02 -0500 (EST) X-Sasl-Enc: IfOwEU0l1tyITAFQLdbtsoR7XHX52kKlXXitVR7Jro7E 1453154942 X-Mailer: MessagingEngine.com Webmail Interface - ajax-6cda141f In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-Mailman-Approved-At: Mon, 18 Jan 2016 20:12:29 -0500 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111730 Archived-At: On Mon, Jan 18, 2016, at 16:12, Alan Third wrote: > I don't know if it's appropriate for OS X, but I'm pretty sure it > matches the codings that the Windows port gives me for en_GB (ENG, in > Windows). Besides, surely it's better than 'nil'? Well, I don't have any trouble opening UTF-8 files. I'm incidentally not sure that it's really appropriate for windows, either - there, it should be using windows-1252, not iso-latin-1. I have to wonder how Emacs behaves on versions of windows whose default codepage is not a trivial superset of an ISO one. The proper encoding should be able to be determined by the GetACP function, and should always be a windows codepage. > > How does Terminal (and iTerm) know to use UTF-8? > > If you load Emacs on OS X from the terminal this code changes some > settings (set-locale-environment in mule-cmds.el): I meant Terminal itself, not Emacs within terminal. For me, it seems to put LANG=en_US.UTF-8 in the environment. > The other possibility is that Terminal.app sets LANG to 'en_GB.UTF-8'. > That final part may be the difference we're seeing here? Yes, I think so. I was wondering also if there's some hidden setting that tells Terminal whether to use UTF-8 or not - I don't think it used it in the earliest versions of OSX. > > This one also makes me wonder if the encoding specified in > > .CFUserTextEncoding/__CF_USER_TEXT_ENCODING should be used for a second > > choice. Which may be an encoding that may not map directly to a locale. > > I'm afriad I don't know what you're talking about here. You may have a file .CFUserTextEncoding in your home directory, or an environment variable __CF_USER_TEXT_ENCODING, specifying a value like [0x1F5:]0x0:0x0 - the first one (in the environment variable only) is your user ID, the next is the encoding (0x0 for MacRoman) which Finder uses for preview of non-UTF8 text files, and the last is the language (0 for English, maybe only US English) For me this is MacRoman (and works as I described with Finder preview windows) even though there is no actual Unix locale for MacRoman.