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#75207: 29.4; Path conversion from native codepage to UTF-8 fails when Windows is set by default to UTF-8 Date: Mon, 30 Dec 2024 21:13:07 +0200 Message-ID: <86a5cdnfwc.fsf@gnu.org> References: <000001db5ab4$06cec970$146c5c50$@0lock.xyz> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34554"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 75207@debbugs.gnu.org To: michal@0lock.xyz Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Dec 30 20:14:45 2024 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 1tSLDx-0008sq-7O for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 30 Dec 2024 20:14:45 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSLDV-0006oY-S1; Mon, 30 Dec 2024 14:14:19 -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 1tSLDI-0006nn-Hd for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 14:14:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSLDG-0000t2-Vu for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 14:14:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=ftIJ1VALSbfHJgj5B/XMlvGYK1///Bup+P5FS2EJuB4=; b=K01iE5mAnrPye3TJEB9DTeyZUjM9Yip7szz0JJhHbeSXs5qz630IVg5Sf66h2c4IQfD/qljX5qwpOVcBhFADtljYXPFiOAUhYXs4AZTJN79gdKEAmOaTYp78NzYJzkLSeIi/f+bDf2PjMIfxZI78yLNDYIWNinaSG35tGmMe9FzykrvikdL5W7Na+2SW3Sa8Uv/yrKFCQ8mBKpvl37iZ9Lcx8XpElALA3DbIJCqiTqm2U4zdIrcYjSGwoOtiAQ9JMSl25PcHgBpyAyfFSqPmR3+9urRK2rs0L96Kx9g+GJ0TjogpBO+d2Jnw4DSoZ71G4VrUj8j5aZ7QDc8Q0FterQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tSLDG-00028F-GI for bug-gnu-emacs@gnu.org; Mon, 30 Dec 2024 14:14:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Dec 2024 19:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75207 X-GNU-PR-Package: emacs Original-Received: via spool by 75207-submit@debbugs.gnu.org id=B75207.17355860038127 (code B ref 75207); Mon, 30 Dec 2024 19:14:02 +0000 Original-Received: (at 75207) by debbugs.gnu.org; 30 Dec 2024 19:13:23 +0000 Original-Received: from localhost ([127.0.0.1]:60004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSLCc-000270-Vk for submit@debbugs.gnu.org; Mon, 30 Dec 2024 14:13:23 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:53306) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSLCX-00026h-A6; Mon, 30 Dec 2024 14:13:21 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tSLCR-0000nI-Pf; Mon, 30 Dec 2024 14:13:11 -0500 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=ftIJ1VALSbfHJgj5B/XMlvGYK1///Bup+P5FS2EJuB4=; b=aIk2fWdy+xWD c6q029Zcyl3+0F3lrp8JQQiA3mQMLW6377HHHrLtRUVMZ+VoMVVwulyPY1cAgJHQmo/iWD00Zacay zrbAbBlyUOqscGLcdWnJpBNZ4/WX8GuaBwdrVgEhYLJltgPNQHresAGWnaBuyzYoQeKoBB8wbNx0e vmeS379eCf9z8H6qyQCUw/b3t3r8NwxNy/+h00gq2TdLgfowHvKpoBR8rLRbcAc9txkFSCpAtUv+J YsYsgQO/o2EWEZrMIqCd0LQc3YnJYQVM0MjgpQUIipucITVXbLyfT/R6A5kp/nPD+kBZutFEbWNnV AdEDMVAnWboyCZZ6rAE13Q==; In-Reply-To: <000001db5ab4$06cec970$146c5c50$@0lock.xyz> (bug-gnu-emacs@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:298021 Archived-At: severity 75207 wishlist thanks > Date: Mon, 30 Dec 2024 12:12:02 +0000 > From: michal--- via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Emacs generates gibberish UTF-8 characters during conversion from native > codepage to UTF-8 if experimental default UTF-8 codepage is set on > Windows. Please provide the minimum recipe for reproducing this, starting from "emacs -Q". What exactly did you convert, and how? And what problems did you see, exactly? Also, what do the following commands produce inside "emacs -Q"? M-: (getenv "ENU") RET M-: current-locale-environment RET M-: w32-ansi-code-page RET M-: (default-value 'buffer-file-coding-system) RET In general, the UTF-8 codepage on Windows is not (yet) supported. In particular, some functions we use in Emacs assume the system codepage cannot be a multibyte encoding. Also, invoking subprocesses on Windows doesn't currently support anything but single-byte encoding of the program's name and its command-line arguments, for boring technical reasons. For that reason, I don't recommend using the UTF-8 codepage, and I don't recommend making UTF-8 the default encoding on MS-Windows. That said, presenting a clear recipe could help us gradually improve support for this, as Windows improves its part in parallel. Thanks.