From: "Michał Lach via Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 75207@debbugs.gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>
Subject: bug#75207: Fwd: bug#75207: 29.4; Path conversion from native codepage to UTF-8 fails when Windows is set by default to UTF-8
Date: Fri, 03 Jan 2025 11:49:34 +0000 [thread overview]
Message-ID: <87F91035-E0D9-4650-B332-10E4E8AD0AEF@0lock.xyz> (raw)
In-Reply-To: <003001db5d81$a8f144b0$fad3ce10$@0lock.xyz>
Forgot to CC the bug report mail.
> Begin forwarded message:
>
> From: <michal@0lock.xyz>
> Subject: RE: bug#75207: 29.4; Path conversion from native codepage to UTF-8 fails when Windows is set by default to UTF-8
> Date: 3 January 2025 at 02:48:53 CET
> To: "'Eli Zaretskii'" <eliz@gnu.org>
> Reply-To: <michal@0lock.xyz>
>
> M-: (getenv "ENU") -> nil
> M-: current-locale-environment -> "ENG"
> M-: w32-ansi-code-page -> 65001
> M-: (default-value 'buffer-file-coding-system) -> iso-latin-1-dos
>
>> That said, presenting a clear recipe could help us gradually improve
>> support for
>> this, as Windows improves its part in parallel.
>
> Here is the repro.
> 1. Put a path to your "PATH" environmental variable with some diacritic
> character (ł in my case, maybe it won't work for some)
> 2. M-: exec-path returns gibberish
>
> Here, "Michał" becomes "MichaÅ‚", you can get a similar result if you do
> MultiByteToWideChar using Windows-1252 codepage on a UTF-8 path.
>
> I've digged around and it looks like codepage_for_filenames (src/w32.c) at
> somepoint returns the Windows-1252 codepage.
> This is then passed to MultiByteToWideChar() and the scenario that I
> described above happens.
> I've checked this hypothesis with API Monitor and this is what actually
> happens, I can attach a trace if you will find it useful.
next prev parent reply other threads:[~2025-01-03 11:49 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-30 12:12 bug#75207: 29.4; Path conversion from native codepage to UTF-8 fails when Windows is set by default to UTF-8 michal--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-12-30 19:13 ` Eli Zaretskii
[not found] ` <003001db5d81$a8f144b0$fad3ce10$@0lock.xyz>
2025-01-03 11:49 ` Michał Lach via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2025-01-03 13:23 ` bug#75207: Fwd: " Eli Zaretskii
2025-01-03 14:35 ` michal--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 15:25 ` Eli Zaretskii
2025-01-04 9:30 ` Eli Zaretskii
2025-01-04 17:37 ` michal--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-05 5:58 ` 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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87F91035-E0D9-4650-B332-10E4E8AD0AEF@0lock.xyz \
--to=bug-gnu-emacs@gnu.org \
--cc=75207@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=michal@0lock.xyz \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).