From: Eli Zaretskii <eliz@gnu.org>
To: "Michał Lach" <michal@0lock.xyz>
Cc: 75207@debbugs.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 15:23:48 +0200 [thread overview]
Message-ID: <86ed1kghej.fsf@gnu.org> (raw)
In-Reply-To: <87F91035-E0D9-4650-B332-10E4E8AD0AEF@0lock.xyz> (message from Michał Lach on Fri, 03 Jan 2025 11:49:34 +0000)
> Date: Fri, 03 Jan 2025 11:49:34 +0000
> From: Michał Lach <michal@0lock.xyz>
> Cc: Eli Zaretskii <eliz@gnu.org>
>
> 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
OK. I think I see the problem (and it is not specific to UTF-8
codepage), but just to be sure, please show some more values:
M-: w32-multibyte-code-page RET
M-: locale-coding-system RET
M-: file-name-coding-system RET
M-: default-file-name-coding-system RET
> > 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.
We think that PATH is encoded in Windows-1252 codepage, and the
question is why and where do we err. The above additional values I
ask about might help answer that question.
> > 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.
Not necessary for now, thanks.
If I send you a C-level patch, are you able to build Emacs after
patching it, preferably the master branch of our Git repository?
next prev parent reply other threads:[~2025-01-03 13:23 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 ` bug#75207: Fwd: " Michał Lach via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-03 13:23 ` Eli Zaretskii [this message]
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=86ed1kghej.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=75207@debbugs.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).