From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#24953: 25.1; Possible inefficiency in UTF-8 Date: Tue, 22 Nov 2016 05:33:18 +0200 Message-ID: <837f7w89z5.fsf@gnu.org> References: <83vavnflg9.fsf@gnu.org> <83eg2bfc51.fsf@gnu.org> <83bmxffaev.fsf@gnu.org> <83twb18q3x.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1479785657 16998 195.159.176.226 (22 Nov 2016 03:34:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 22 Nov 2016 03:34:17 +0000 (UTC) Cc: 24953@debbugs.gnu.org To: Eli Barzilay Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Nov 22 04:34:13 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 1c91qW-0002zv-H6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 22 Nov 2016 04:34:12 +0100 Original-Received: from localhost ([::1]:53044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c91qY-0002mu-8z for geb-bug-gnu-emacs@m.gmane.org; Mon, 21 Nov 2016 22:34:14 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c91qS-0002mj-6H for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 22:34:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c91qO-00036E-3V for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 22:34:08 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50465) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1c91qO-000362-0S for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 22:34:04 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1c91qN-0007N7-NY for bug-gnu-emacs@gnu.org; Mon, 21 Nov 2016 22:34:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 22 Nov 2016 03:34:03 +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.147978559828275 (code B ref 24953); Tue, 22 Nov 2016 03:34:03 +0000 Original-Received: (at 24953) by debbugs.gnu.org; 22 Nov 2016 03:33:18 +0000 Original-Received: from localhost ([127.0.0.1]:37631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c91pd-0007Ly-TH for submit@debbugs.gnu.org; Mon, 21 Nov 2016 22:33:18 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c91pc-0007Ln-Np for 24953@debbugs.gnu.org; Mon, 21 Nov 2016 22:33:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c91pR-0002Qu-Io for 24953@debbugs.gnu.org; Mon, 21 Nov 2016 22:33:09 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56688) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c91pR-0002Qo-FA; Mon, 21 Nov 2016 22:33:05 -0500 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4213 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1c91pQ-0000EO-Qu; Mon, 21 Nov 2016 22:33:05 -0500 In-reply-to: (message from Eli Barzilay on Mon, 21 Nov 2016 16:38:07 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] 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:125971 Archived-At: > From: Eli Barzilay > Date: Mon, 21 Nov 2016 16:38:07 -0500 > Cc: 24953@debbugs.gnu.org > > > It isn't expected with Emacs 25.1, as it specifically sets up things > > assuming Git reports its data in UTF-8. Are you sure you didn't set > > i18n.commitEncoding in your Git configuration, or have some non-ASCII > > text encoded in something other than UTF-8 in that repository? > > I just ran into an encoding problem, with files now: openning a utf-8 > file with a single lambda (\316\273) sometimes failes, and I traced this > to whether I start Emacs from Windows or from a cygwin shell. That's unrelated to Git, though. > 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.