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#56469: 29.0.50; Unibyte dir in directory_files_internal Date: Sun, 10 Jul 2022 18:07:24 +0300 Message-ID: <83a69h0zwz.fsf@gnu.org> References: <83y1x2177x.fsf@gnu.org> <83bktx11ji.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16461"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56469@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 10 17:08:13 2022 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 1oAYXc-0004A5-SM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jul 2022 17:08:13 +0200 Original-Received: from localhost ([::1]:49244 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oAYXb-0007ZQ-FJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 10 Jul 2022 11:08:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAYXS-0007Xy-Lr for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2022 11:08:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43807) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oAYXS-0006Cl-Ao for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2022 11:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oAYXS-0004oX-41 for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2022 11:08: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: Sun, 10 Jul 2022 15:08:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56469 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 56469-submit@debbugs.gnu.org id=B56469.165746566718484 (code B ref 56469); Sun, 10 Jul 2022 15:08:02 +0000 Original-Received: (at 56469) by debbugs.gnu.org; 10 Jul 2022 15:07:47 +0000 Original-Received: from localhost ([127.0.0.1]:37704 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAYXD-0004o4-69 for submit@debbugs.gnu.org; Sun, 10 Jul 2022 11:07:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:50628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oAYXB-0004nq-BC for 56469@debbugs.gnu.org; Sun, 10 Jul 2022 11:07:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:37260) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oAYX6-0004YR-17; Sun, 10 Jul 2022 11:07:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=/eszlao97Yump3Y/MDHZODdccfTbPspUy9ArS/UKEc4=; b=rfYS1koi1FQi eEogp488xZHA2QSt5fkiHNfdueNpB5D0ReIFO3w1YPnVVh8lJfxGfU4UKRt8nAS7+kE6aZbflavMa tIICPF8sCJrsMd16afWsjt9qPEXC8LXhs8kKjmIXqOQWIuNJmOMvm7i++RhogzM5EAz5mUoJJsxJe 0RP8/0GBweSt3QETsf0fAIc01TdAmzJjrOnx19CmfY0savUsl6Q3bF7TjdwUoZBCRcwiowkeW5up0 ZKXffUbjyRk1ZUtlFIIQAXyrZkLW39fLlrIQHttSFje/j0+r+j8igseOxJixbOgw2QCU8Qzypd5o1 4A9PA5c4GJn4vMBQ1doLIQ==; Original-Received: from [87.69.77.57] (port=4577 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 1oAYX5-0000fM-Gg; Sun, 10 Jul 2022 11:07:39 -0400 In-Reply-To: (message from Stefan Monnier on Sun, 10 Jul 2022 10:58:30 -0400) 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:236583 Archived-At: > From: Stefan Monnier > Cc: 56469@debbugs.gnu.org > Date: Sun, 10 Jul 2022 10:58:30 -0400 > > Eli Zaretskii [2022-07-10 17:32:17] wrote: > > > I don't think this is true, because early during startup we don't yet > > have the coding-systems set up, and so the file names are unibyte and > > undecoded. So that place in dired.c doesn't only handle ASCII when it > > sees that ncahrs == nbytes. > > Hmm... the early startup is actually not a worry here (according to my > tests `directory_files_internal` is first called when we get to > native-compile the macroexp/bytecomp, at which point all our coding > systems have been setup). That could be the situation _today_, but that's just sheer luck (or lack thereof). In general, all the file-handling code we have in fileio.c and dired.c should be equally prepared to handle unibyte non-ASCII file names and multibyte file names, because we may need that any time. When we make changes in Emacs, we shouldn't be worried whether those changes could cause some dired.c code be called early on during Emacs startup.