From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#15803: default-file-name-coding-system: utf-8 better than latin-1 these days? Date: Fri, 11 Sep 2020 13:27:28 +0200 Message-ID: <87een81rkv.fsf@gnus.org> References: <708ten8bam.fsf@fencepost.gnu.org> <83shcu3mtf.fsf@gnu.org> <83y3mdwo0a.fsf@gnu.org> <87imcn9jmq.fsf@gnus.org> <835z8nknar.fsf@gnu.org> <87r1r97pbz.fsf@gnus.org> <835z8lk85y.fsf@gnu.org> <87imck1t1g.fsf@gnus.org> <83h7s4h8uh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4684"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: rgm@gnu.org, 15803@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 11 13:28:09 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGhDt-00015o-EN for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Sep 2020 13:28:09 +0200 Original-Received: from localhost ([::1]:34894 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGhDs-0006RF-Gg for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 11 Sep 2020 07:28:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46394) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGhDm-0006R3-2X for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2020 07:28:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:59358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGhDl-0000Op-PT for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2020 07:28:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kGhDl-0000Ph-LV for bug-gnu-emacs@gnu.org; Fri, 11 Sep 2020 07:28:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 11 Sep 2020 11:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15803 X-GNU-PR-Package: emacs Original-Received: via spool by 15803-submit@debbugs.gnu.org id=B15803.15998236681553 (code B ref 15803); Fri, 11 Sep 2020 11:28:01 +0000 Original-Received: (at 15803) by debbugs.gnu.org; 11 Sep 2020 11:27:48 +0000 Original-Received: from localhost ([127.0.0.1]:42668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGhDX-0000Oy-U6 for submit@debbugs.gnu.org; Fri, 11 Sep 2020 07:27:48 -0400 Original-Received: from quimby.gnus.org ([95.216.78.240]:50078) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGhDW-0000Om-6A for 15803@debbugs.gnu.org; Fri, 11 Sep 2020 07:27:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=8YThs+2YJYsWyCyAWXRoPHiBtf30zZSyD2SseARvC9s=; b=Diub3Y9RyQ6yjA+57CDqfSIUEt sA0/zqJShP8dQuUcnMer6de63s15sZ08MSxqVSbMM1ZtoNNrGS1OwNUeZbhRU2GLV4GIWz6d8A3b2 oMC81YKkaI/NfYdV+muSXPD45NOBnYmk3OfigLg8RPI0HxQMJCfGtXslXfSuoRGD3uSc=; Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGhDF-0001Pn-Pa; Fri, 11 Sep 2020 13:27:39 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEX8/PXl3tOpnJhi V1mHd3c3LzT///98Xaj6AAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QJCwsON7F7cSQAAAGqSURBVDjL bdRtdqwgDAZgHL3/xdMF1JAuoIQsoAQ3ILL/rdzgV/F08m98Tl5InBljjuqstRN5e5R+Nma8AYRu 0CcnjNbiQuMv2NFcaY7zZ3eDaUCoge4Gg9J2/EaZSfJo3sGL8mjfRb24BdOA8Pf4pqOzjijOf8FO mBLRfK7khgkgKYjvntAhgAtCFJ7X7SxEXaJQpie8wHkF+guRc31eslxznDNEl+udCslspwYGjxso MKZvi80cQ3TbVAHQHx326nAbop6d0mqhObz/cRtUIAkwNzBEyQqcKSDExxm86cUqQIzN1gfgNbqj I0DT0QMHqvclQgptFLBP4CgQpQOuyRVAs3xdZHgsUTuCAoo8onooIMJFzxBeH1Dn88wqnOsbPFfS 44oYflzdPOXmZ9A7j0Cgz4NIbt55BZcraOK2R10Q01J0iqCw7lHmgm0pmbIHlPURFb2C6JjpgDPq 4ytEnUK/PiBLC6+FcB+vhH3AO2rQZXApmWvcA/iAUjw9oOcoZa9EvDXwLwAfQLm0MAQsZ3GIzYAD uhsiNPBydEHxbUc3zXDV+e/zvrr/z5Nz6RlXsqsAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDkt MTFUMTE6MTQ6NTQrMDA6MDDPQszDAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5LTExVDExOjE0 OjU0KzAwOjAwvh90fwAAAABJRU5ErkJggg== X-Now-Playing: Rema Rema's _Fond Reflections (1): Wheel in the Roses (Extended)_: "Rema Rema" In-Reply-To: <83h7s4h8uh.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 11 Sep 2020 14:05:26 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187813 Archived-At: Eli Zaretskii writes: >> But I think I know why "make check" was failing: >>=20 >> [larsi@stories ~/src/emacs/trunk]$ echo $LANG >> sv_SE.ISO-8859-1 >> [larsi@stories ~/src/emacs/trunk]$ echo $LANG >> en_US.UTF-8 > > I don't understand this: 2 identical commands one after the other > yield different results? Sorry, there was a "bash" started in between there. >> This time over, the directory is "f=C3=B3o" (in latin-1), and that looks= like >> Emacs is trying to find the utf-8 version of the file name. > > If that's the case, then we lack ENCODE_FILE (or more generally don't > encode a file name) somewhere. After instrumenting bytecomp (i.e., adding a bunch of messages), I see what function is actually failing. With this in byte-compile-file: (message "foo2: %S" (prin1-to-string tempfile)) (unless (=3D temp-modes desired-modes) (set-file-modes tempfile desired-modes 'nofollow)) (message "foo1: %S" (prin1-to-string tempfile)) I get this output: make[1]: Entering directory '/home/larsi/src/emacs/f=EF=BF=BDo/test' ELC lisp/eshell/eshell-tests.elc foo2: "#(\"/home/larsi/src/emacs/f=C3=B3o/test/lisp/eshell/eshell-tests.elc= njDFYY\" 0 65 (charset iso-8859-1))" >>Error occurred processing lisp/eshell/eshell-tests.el: File is missing ((= "Doing chmod" "No such file or directory" "/home/larsi/src/emacs/f\303\263o= /test/lisp/eshell/eshell-tests.elcnjDFYY")) make[1]: *** [Makefile:165: lisp/eshell/eshell-tests.elc] Error 1 So it's created a tempfile, tagged with the correct charset (I had no idea that that's how it worked), but decoded, and then set-file-modes interprets that as an UTF-8 file name. So... it's a bug in set-file-modes? Hm, nope, write-region has the same problem. That weird file name (decoded and tagged with a charset text parameter) comes from make-temp-file -- everything seems to be OK before that. target-file is: foo: "\"/home/larsi/src/emacs/f\\363o/test/lisp/eshell/eshell-tests.elc\"" which seems to be correct, but (tempfile (make-temp-file (expand-file-name target-file))) is "#(\"/home/larsi/src/emacs/f=C3=B3o/test/lisp/eshell/eshell-tests.elcnjDFYY= \" 0 65 (charset iso-8859-1))" and then things fail. Which makes me wonder why building Emacs at all works if it's such a fundamental problem... Just to check whether my system is switching the LANG back to utf-8: (message "foo: %S" (getenv "LC_ALL")) in byte-compile-file says foo: "sv_SE.ISO-8859-1" --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no