From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#48902: 28.0.50; Directory names containing apostrophes and backticks cause problems Date: Tue, 08 Jun 2021 21:09:51 +0300 Message-ID: <83lf7kdy8h.fsf@gnu.org> References: <51cb-60bf4900-1dd-2840bc80@23790836> <875yyoo9gy.fsf@gnus.org> <834ke8fs68.fsf@gnu.org> <83zgw0e9ou.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17043"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48902@debbugs.gnu.org, larsi@gnus.org, salutis@me.com, naofumi@yasufuku.dev To: Alan Third Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 08 20:11:25 2021 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 1lqgCC-0004Fd-S0 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 20:11:24 +0200 Original-Received: from localhost ([::1]:52126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqgCB-00018K-EZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 14:11:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56524) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqgBq-000177-TE for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 14:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48212) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqgBq-0003df-MB for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 14:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqgBq-0002LM-IE for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 14:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 08 Jun 2021 18:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48902 X-GNU-PR-Package: emacs Original-Received: via spool by 48902-submit@debbugs.gnu.org id=B48902.16231758278963 (code B ref 48902); Tue, 08 Jun 2021 18:11:02 +0000 Original-Received: (at 48902) by debbugs.gnu.org; 8 Jun 2021 18:10:27 +0000 Original-Received: from localhost ([127.0.0.1]:59758 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqgBD-0002KR-0A for submit@debbugs.gnu.org; Tue, 08 Jun 2021 14:10:27 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqgB8-0002K9-GA for 48902@debbugs.gnu.org; Tue, 08 Jun 2021 14:10:21 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42242) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqgB0-0003BA-Jq; Tue, 08 Jun 2021 14:10:10 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4156 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqgAx-0001uk-B5; Tue, 08 Jun 2021 14:10:10 -0400 In-Reply-To: (message from Alan Third on Tue, 8 Jun 2021 17:19:44 +0100) 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:208255 Archived-At: > Date: Tue, 8 Jun 2021 17:19:44 +0100 > From: Alan Third > Cc: larsi@gnus.org, naofumi@yasufuku.dev, 48902@debbugs.gnu.org, > salutis@me.com > > In this case the call to ENCODE_FILE in allocInitFromFile is actually > redundant because image_find_image_fd already calls ENCODE_FILE on the > filename before passing it back. So we get a UTF-8 string no matter > what. Then why was the code re-encoding t in UTF-16? A bug? > NSString can read in almost anything, and Mattias extended it to read > in multibyte (and ascii) lisp strings, so we don't need a UTF-16 input > specifically. It would probably be nice if NSString was also able to > recognise that a lisp string is UTF-8 and handle that itself, but I > don't think that's really possible, unless we make the assumption that > any unibyte string it's passed will already be ascii or UTF-8. > > I don't know if that's a reasonable assumption. Any file name passed through ENCODE_FILE should be in UTF-8 on macOS, as I understand that's how the macOS filesystems work. Am I mistaken? Can the value of default-file-name-coding-system on macOS be anything other than UTF-8?