From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Grzegorz Kowzan" Newsgroups: gmane.emacs.bugs Subject: bug#61934: 28.2; Exec format error when `default-directory` contains non-ASCII characters on Windows 11 Date: Fri, 03 Mar 2023 18:57:32 +0100 Message-ID: <2aad82de-4ab4-452d-a4f1-73a35d0db11e@app.fastmail.com> References: <6ce62338-467e-44d1-a503-15a0dc53b4cd@app.fastmail.com> <83wn3xc2y2.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="30688"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Cyrus-JMAP/3.9.0-alpha0-183-gbf7d00f500-fm-20230220.001-gbf7d00f5 Cc: 61934@debbugs.gnu.org To: "Eli Zaretskii" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 03 18:59:19 2023 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 1pY9gc-0007lA-QE for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Mar 2023 18:59:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pY9gP-0003FD-5J; Fri, 03 Mar 2023 12:59:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY9gN-0003Eg-8R for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 12:59:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pY9gM-0000aK-Os for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 12:59:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pY9gM-0001UE-7J for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 12:59:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Grzegorz Kowzan" Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2023 17:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61934 X-GNU-PR-Package: emacs Original-Received: via spool by 61934-submit@debbugs.gnu.org id=B61934.16778662825620 (code B ref 61934); Fri, 03 Mar 2023 17:59:02 +0000 Original-Received: (at 61934) by debbugs.gnu.org; 3 Mar 2023 17:58:02 +0000 Original-Received: from localhost ([127.0.0.1]:33910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY9fN-0001SU-F3 for submit@debbugs.gnu.org; Fri, 03 Mar 2023 12:58:01 -0500 Original-Received: from out2-smtp.messagingengine.com ([66.111.4.26]:36547) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY9fL-0001SC-H6 for 61934@debbugs.gnu.org; Fri, 03 Mar 2023 12:57:59 -0500 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 745FB5C00EE; Fri, 3 Mar 2023 12:57:54 -0500 (EST) Original-Received: from imap46 ([10.202.2.96]) by compute4.internal (MEProxy); Fri, 03 Mar 2023 12:57:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kowzan.eu; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm1; t= 1677866274; x=1677952674; bh=6zNJKahoNXjzVqFtZjdHzaMM3R2uEDevbJ6 PHaeE9yI=; b=BmTNsbncel1cAYy54kIJT2c9/Mw7OTD7QR8oMjkCQjakIa2Zl9/ 2DjB6OfJyfB2HqWwnTGoeWG7k9ym1OtVtOVMp2gA3DRVRPy4CRE1G6ltMO2OsZoy hPKnm4hgYT7Uu0pF/oBcB2qjy2PK0cGEHulUsCK4GKS2kMXZtG7aa7jd44Txo2D3 8QeMnK2gYS2J/K1eri1go8/gwWG71QRXKndEo7nLH+kAvt0gqAFQEcyjsvbVgOI5 k4hPPuFmqHAdu7zWik+TyTq3tSSRco9CXKv51DQgimcp9ec/qb1chijdlAP9/i6Q Q4amooNSNhKG7OOA/tcYuwpDaNUp+zQfQsg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1677866274; x=1677952674; bh=6zNJKahoNXjzVqFtZjdHzaMM3R2uEDevbJ6 PHaeE9yI=; b=frFyts0XJBewocslJgU2lsN8pzuJcedkgN5iIxTEka0hWGxRMEV NGdten1gQ3/DDCWWCxKJZFwp2i66D17Y6uo+NcwxWEa6gz5lTtz/RZ/Aik6VhkRP jSpCxhjWXDDP5CekFDAIGMGsLFdW7O16zEsSTmld4pRbkboosl+bLHV31wjagtcz LYL0rdtT/TY9ApcC5i+pa7IjZpw+oUEXEa0ah0FQkQqXq40V7BNTyWGfYI0u1HPT 1lLlFs2jl3NIljiSiLNHrO5bIzK+JRUkpmJqNiiplrhbcY0vZjFzOnFprzDxJApE SFHavn/A1+z6UGRsLsqo3no8NFOMDw/A6PQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrudelledguddtudcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedf ifhriigvghhorhiiucfmohifiigrnhdfuceoghhriigvghhorhiisehkohifiigrnhdrvg huqeenucggtffrrghtthgvrhhnpeehgfeihfelgefgfeeukedvfeelhffgjeetudehvedu ueelgffhfefhhfejheekteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehgrhiivghgohhriieskhhofiiirghnrdgvuh X-ME-Proxy: Feedback-ID: ib4114772:Fastmail Original-Received: by mailuser.nyi.internal (Postfix, from userid 501) id B1F3B2A20080; Fri, 3 Mar 2023 12:57:53 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface In-Reply-To: <83wn3xc2y2.fsf@gnu.org> 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257224 Archived-At: Thank you for the explanation. Can the code page be changed from within = Emacs or is it set for good at startup? I tried changing the codepage to= cp1250, which can handle all the characters in the directory name, with= appropriate commands but I still get the same errors. When I execute (d= escribe-coding-system) I get: Coding system for saving this buffer: Not set locally, use the default. Default coding system (for new files): * -- windows-1250 (alias: cp1250) Coding system for keyboard input: * -- windows-1250-unix (alias: cp1250-unix) Coding system for terminal output: * -- cp1250 (alias of windows-1250) Coding system for inter-client cut and paste: U -- utf-16le-dos Defaults for subprocess I/O: decoding: * -- windows-1250-dos (alias: cp1250-dos) encoding: * -- windows-1250-unix (alias: cp1250-unix) Priority order for recognizing coding systems when reading files: 1. windows-1250 (alias: cp1250) 2. utf-8 (alias: mule-utf-8 cp65001) ... which looks good to me. On the other hand, I did check that I can execut= e commands from a directory named C:/=C3=BE=C3=B1=C3=9C, which has chara= cters beyond ASCII that are handled by cp1252. Best regards, Grzegorz On Fri, Mar 3, 2023, at 15:41, Eli Zaretskii wrote: >> Date: Fri, 03 Mar 2023 14:56:32 +0100 >> From: "Grzegorz Kowzan" >>=20 >> Calling external commands fails on Emacs under Windows 11 if >> `default-directory' contains non-ASCII characters. Steps to reproduce: >>=20 >> 0. Start emacs -Q >> 1. Create directory C:/za=C5=BC=C3=B3=C5=82=C4=87g=C4=99=C5=9Bl=C4=85= ja=C5=BA=C5=84. >> 2. Enter the directory with dired. >> 3. Press M-! and try executing any command. >> 4. Minibuffer shows error message: "Spawning child process: Exec form= at error" > > This is expected. Emacs on Windows supports starting programs only if > the command-line arguments, including the program's file name, can be > encoded in the system's codepage. According to this bug report, your > system codepage is 1252, and the file name you show cannot be encoded > using that codepage. > > This is a limitation of how Emacs on Windows invokes programs, but the > root cause is that many programs that run on Windows only support the > current codepage, and cannot support UTF-8 due to Windows misfeatures. > > Sorry.