From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Barzilay Newsgroups: gmane.emacs.bugs Subject: bug#24953: 25.1; Possible inefficiency in UTF-8 Date: Sun, 11 Dec 2016 05:53:33 -0500 Message-ID: References: <83vavnflg9.fsf@gnu.org> <83eg2bfc51.fsf@gnu.org> <83bmxffaev.fsf@gnu.org> <83twb18q3x.fsf@gnu.org> <837f7w89z5.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: blaine.gmane.org 1481453718 28639 195.159.176.226 (11 Dec 2016 10:55:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 11 Dec 2016 10:55:18 +0000 (UTC) Cc: 24953@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 11 11:55:14 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cG1mj-0005gK-P6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Dec 2016 11:55:14 +0100 Original-Received: from localhost ([::1]:55147 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG1mh-0000Cq-PK for geb-bug-gnu-emacs@m.gmane.org; Sun, 11 Dec 2016 05:55:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49225) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cG1mb-0000BL-V8 for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2016 05:55:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cG1mY-0001XN-UP for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2016 05:55:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50383) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cG1mY-0001XG-RR for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2016 05:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cG1mY-0002gR-Hj for bug-gnu-emacs@gnu.org; Sun, 11 Dec 2016 05:55:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Barzilay Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 11 Dec 2016 10:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 24953 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 24953-submit@debbugs.gnu.org id=B24953.148145364910245 (code B ref 24953); Sun, 11 Dec 2016 10:55:02 +0000 Original-Received: (at 24953) by debbugs.gnu.org; 11 Dec 2016 10:54:09 +0000 Original-Received: from localhost ([127.0.0.1]:37549 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cG1lc-0002f7-D3 for submit@debbugs.gnu.org; Sun, 11 Dec 2016 05:54:08 -0500 Original-Received: from mail-yw0-f179.google.com ([209.85.161.179]:34197) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cG1lX-0002eY-Bp for 24953@debbugs.gnu.org; Sun, 11 Dec 2016 05:54:03 -0500 Original-Received: by mail-yw0-f179.google.com with SMTP id t125so45499621ywc.1 for <24953@debbugs.gnu.org>; Sun, 11 Dec 2016 02:53:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=barzilay-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=mC9QLXM0U6L5EHdqgOGN7t1zNqRmv0I9I2Sk+lk+i0w=; b=isjIG9nLnCcMBHSiKXKTYWa5MufT63IXGC+2hYXdBWoARXON3d1ABgeQRBAV2R249z Nb8km5FCVSvQ/sf9dqH5GyexPVzIzfcwtkDpxO6wcLRoOlFIVmEQTcIbkcesmgDXKxGV +jbE/e+4Lfp88PQ1ZVhaIfx4U9JqXDUcOiTbzpuWl2HBbH825SC0eR/orz7MiWh7Cm7h lNr1DeXHCPxdKwm2Guiv4zDoZtH38zK8+VaXc9R6m93t9TNPAdQls5OmvK6aBBKUsZ+Q BNzktDNy6qDr7RSxWONEI2OzHLebPiLs+rjb8Um0UZour/uEq0syfo4+/PblLQUh1KQS umlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=mC9QLXM0U6L5EHdqgOGN7t1zNqRmv0I9I2Sk+lk+i0w=; b=F9H/RK4OVGkKg3vac54Uk7J+jNWnUGDErB6T4+ed8IJIWnbACEPuUNo4fygd5mJWyg ZW51kmR0/dl38gFrDk6C3i5ax4dalF3QbWolcK0ZEyBjr/esKPZTd7MWcws6i6vWhM11 l8fPq2tsaCwRcbzBSTFNGUWM1BwMuXz6BBBgLiVJIGycNlF6GXvh1qzIDBkGEYiIcA3n eZUKJlZI2gvgtjexWZMbsS/ok9BA7lKbNWzCM4s2AjwJjuqv2MEiyGj4YDQUV4R73spT XwnQ4ZkmOPWNs/YNZStdBQYzOTnewTO0I3FgLx0+WOYaQpD1N75qGOpFGKJV4iaM7bJK HMuQ== X-Gm-Message-State: AKaTC030ybWdOytGafm+g/Ap64DCML1/M0EyBNEjBCewkMOqkEV55f1aHYlKBMnLfyta9Gb4QVAZJICp8Vw3Gg== X-Received: by 10.129.4.130 with SMTP id 124mr82012941ywe.333.1481453633711; Sun, 11 Dec 2016 02:53:53 -0800 (PST) Original-Received: by 10.37.98.129 with HTTP; Sun, 11 Dec 2016 02:53:33 -0800 (PST) In-Reply-To: <837f7w89z5.fsf@gnu.org> 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-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" Xref: news.gmane.org gmane.emacs.bugs:126852 Archived-At: On Mon, Nov 21, 2016 at 10:33 PM, Eli Zaretskii wrote: >> From: Eli Barzilay >> Date: Mon, 21 Nov 2016 16:38:07 -0500 >> Cc: 24953@debbugs.gnu.org >> >> In the latter case, my shell has an explicit LANG setting and the >> result is that Emacs opens that file fine, but in the first case, >> when Emacs is started directly by windows, there is no LANG, and the >> utf-8 file is not treated as such (looks like it opens it in >> latin-1). I verified this with "emacs -Q" too. > > Emacs sets LANG internally, by using a suitable Windows API, when it > runs on Windows (unless LANG is set in the shell), so the fact that > LANG is not set is not a problem in itself. > > What you describe is expected with the default Windows settings: a > file that is in no particular mode which requires UTF-8 will not be > automatically decoded as UTF-8, without some customizations. You > could also put file-local variables into the file. I still didn't get to try and see if I can get the git problem, but the problem seems to be moot for me: I use *both* Linux and Windows, a lot. I synchronize files between the two, and I work with Linux mounts on Windows. In short, I have a ton of files that are UTF-8, so it makes sense to have it be my default on Windows too. In the around-month-or- so which I used without it, I ran into several cases where the default character encoding was broken, and OTOH, in years of using an explicit UTF-8 I haven't had any problems... -- ((x=>x(x))(x=>x(x))) Eli Barzilay: http://barzilay.org/ Maze is Life!