all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Grzegorz Kowzan" <grzegorz@kowzan.eu>
To: "Eli Zaretskii" <eliz@gnu.org>
Cc: 61934@debbugs.gnu.org
Subject: bug#61934: 28.2; Exec format error when `default-directory` contains non-ASCII characters on Windows 11
Date: Fri, 03 Mar 2023 19:23:07 +0100	[thread overview]
Message-ID: <fc1ea7db-58d2-44fd-9fbc-d90fdb2b33de@app.fastmail.com> (raw)
In-Reply-To: <2aad82de-4ab4-452d-a4f1-73a35d0db11e@app.fastmail.com>

I changed the system code page globally and it is working now with directories containing my language's special characters.

Thank you for the help,
Grzegorz

On Fri, Mar 3, 2023, at 18:57, Grzegorz Kowzan wrote:
> 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 (describe-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 
> execute commands from a directory named C:/þñÜ, which has characters 
> 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" <grzegorz@kowzan.eu>
>>> 
>>> Calling external commands fails on Emacs under Windows 11 if
>>> `default-directory' contains non-ASCII characters. Steps to reproduce:
>>> 
>>> 0. Start emacs -Q
>>> 1. Create directory C:/zażółćgęśląjaźń.
>>> 2. Enter the directory with dired.
>>> 3. Press M-! and try executing any command.
>>> 4. Minibuffer shows error message: "Spawning child process: Exec format 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.





  reply	other threads:[~2023-03-03 18:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03 13:56 bug#61934: 28.2; Exec format error when `default-directory` contains non-ASCII characters on Windows 11 Grzegorz Kowzan
2023-03-03 14:41 ` Eli Zaretskii
2023-03-03 17:57   ` Grzegorz Kowzan
2023-03-03 18:23     ` Grzegorz Kowzan [this message]
2023-03-03 19:14       ` Eli Zaretskii
2023-03-03 18:31     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fc1ea7db-58d2-44fd-9fbc-d90fdb2b33de@app.fastmail.com \
    --to=grzegorz@kowzan.eu \
    --cc=61934@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.