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:18:57 +0300 Message-ID: <83h7i8dxta.fsf@gnu.org> References: <51cb-60bf4900-1dd-2840bc80@23790836> <875yyoo9gy.fsf@gnus.org> <87r1hcmu2q.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 48902@debbugs.gnu.org, larsi@gnus.org, salutis@me.com, alan@idiocy.org, naofumi@yasufuku.dev To: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 08 20:20:09 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 1lqgKe-0005dB-Pk for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 20:20:08 +0200 Original-Received: from localhost ([::1]:58266 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqgKd-0006Au-OR for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 08 Jun 2021 14:20:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:58248) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lqgKY-0006Ak-63 for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 14:20:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lqgKX-0006z8-VD for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 14:20:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lqgKX-0002Ze-RR for bug-gnu-emacs@gnu.org; Tue, 08 Jun 2021 14:20:01 -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:20:01 +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.16231763729850 (code B ref 48902); Tue, 08 Jun 2021 18:20:01 +0000 Original-Received: (at 48902) by debbugs.gnu.org; 8 Jun 2021 18:19:32 +0000 Original-Received: from localhost ([127.0.0.1]:59772 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqgK0-0002Yj-9G for submit@debbugs.gnu.org; Tue, 08 Jun 2021 14:19:32 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:60370) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lqgJy-0002YW-Oz for 48902@debbugs.gnu.org; Tue, 08 Jun 2021 14:19:27 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42470) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lqgJr-0006mX-Rf; Tue, 08 Jun 2021 14:19:19 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:4714 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 1lqgJo-00036U-4r; Tue, 08 Jun 2021 14:19:19 -0400 In-Reply-To: (message from Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= on Tue, 8 Jun 2021 19:45:22 +0200) 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:208258 Archived-At: > From: Mattias Engdegård > Date: Tue, 8 Jun 2021 19:45:22 +0200 > Cc: 48902@debbugs.gnu.org, Alan Third , > Rudolf Adamkovič , naofumi@yasufuku.dev > > The quick fix of reverting to stringWithUTF8String: will work, but the real problem is that we have no control of the encodedness of lisp strings being passed around. The usual technique in these cases is to keep Lisp strings unencoded, encode them when passing to the low-level C functions, and pass to those functions only the pointer to the string's data. In those rare cases when you really need to pass a Lisp string that is an encoded file name, call the argument "encoded_file" or somesuch. But these cases should be rare exceptions.