From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Tor Kringeland Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 07:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 51832@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163687351821230 (code B ref -1); Sun, 14 Nov 2021 07:06:02 +0000 Received: (at submit) by debbugs.gnu.org; 14 Nov 2021 07:05:18 +0000 Received: from localhost ([127.0.0.1]:48986 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mm9Zl-0005WL-Bs for submit@debbugs.gnu.org; Sun, 14 Nov 2021 02:05:17 -0500 Received: from lists.gnu.org ([209.51.188.17]:43944) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mm5uT-0002gH-7M for submit@debbugs.gnu.org; Sat, 13 Nov 2021 22:10:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:53832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mm5uS-0005pB-Vb for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 22:10:24 -0500 Received: from mailgw101.it.ntnu.no ([129.241.56.177]:49234) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mm5uQ-0002xm-AM for bug-gnu-emacs@gnu.org; Sat, 13 Nov 2021 22:10:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntnu.no; i=@ntnu.no; q=dns/txt; s=s1-1909-ntnu; t=1636859411; h=from : to : subject : date : message-id : mime-version : content-type : content-transfer-encoding : from; bh=sw0l6FKdmj9IoBeWEftFuWNsY1WgpiCD1UX6H94h6Wo=; b=PooUtMzuYyr25iJOLPeKmezP1HtU6VJ8scAr4mc2c9xgpw5tcAsCpEm9VBKcmCy7gYUxv ofTwnYSjiEGmPTteZJv+MB1TWHYXttmbstw+YImRcGpuc9Glg9O8R2Ax7JgrVc1fvIe8WGh vuusI1sMIkmLrvJaDXWcZGyue0JFpiafyI4rPPvXU+byM72V3y8tgmvj0et+rHGvBkbSKNT E8zeEQnCAQ4OtUTQ8Ke1xIQQcQay+hB3jnszlyO3cCpmSQ6bWQLdlMxITPrNEcj8QGHZcz3 mJlr2rw8K0UPVvzuzUC7jt+gBF7RMLCu8AU5x498EycmDLaBfnkSmOY0E4pw== Received: from localhost (localhost [127.0.0.1]) by mailgw101.it.ntnu.no (Postfix) with ESMTP id E55D71DE1F60 for ; Sun, 14 Nov 2021 04:10:11 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mailgw101.it.ntnu.no X-Spam-Flag: NO X-Spam-Score: -4.59 X-Spam-Level: Received: from mailgw101.it.ntnu.no ([127.0.0.1]) by localhost (mailgw101.it.ntnu.no [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GDMoceCla7h9 for ; Sun, 14 Nov 2021 04:10:11 +0100 (CET) Received: from localhost (unknown [37.120.203.82]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: takringe@ntnu.no) by mailgw101.it.ntnu.no (Postfix) with ESMTPSA id 95A4D1DE26B8 for ; Sun, 14 Nov 2021 04:10:11 +0100 (CET) From: Tor Kringeland Date: Sun, 14 Nov 2021 04:10:10 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=129.241.56.177; envelope-from=tor.a.s.kringeland@ntnu.no; helo=mailgw101.it.ntnu.no X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.6 (-) X-Mailman-Approved-At: Sun, 14 Nov 2021 02:05:16 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.6 (--) Running (shell-command "echo -n '=E6=82=9F' | pbcopy") or (shell-command "echo -n '=C3=B8=C3=B8=C3=B8=C3=B8' | pbcopy") fills the clipboard with `=C3=8A=C3=87=C3=BC' and `=E2=88=9A=E2=88=8F', res= pectively, while if I run the same commands in a terminal emulator outside Emacs I get back the original input. The same happens if I run the same shell commands in `eshell'. This happens when I run a recent build of Emacs 29 with `-Q' on macOS Catalina. From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 07:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Tor Kringeland Cc: 51832@debbugs.gnu.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163687482832025 (code B ref 51832); Sun, 14 Nov 2021 07:28:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 07:27:08 +0000 Received: from localhost ([127.0.0.1]:49033 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mm9uu-0008KT-71 for submit@debbugs.gnu.org; Sun, 14 Nov 2021 02:27:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mm9ut-0008K5-4P for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 02:27:07 -0500 Received: from [2001:470:142:3::e] (port=45632 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mm9un-0005CM-LE; Sun, 14 Nov 2021 02:27:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=c2aSJuXuFXT0SghadsaZmP/HWT+Ej2+gWA8OYLcXgJc=; b=a0iyrKUL7fouFmVbg8lU TolsHXai+OFOAgvs8Y3khuuh/9osbs1DKOJ5rFHzUqivrvUnZH0v4YZpr68fzNHk4ts1iG12h4Bvg uo+q+mBnYUjpQC/bO5QEZ9Nj1hDTzjzrOFAt5OBnoWN/JBBk5qdG3/FvPCxqZGWOvaOBX6zJELbFZ 2eWuRw1FkIuQkR0kuusm9OwQnvtshgeFcNGYSbbKgA2wSgZ8/djXyg5ION+FN8w4v+g+ei1kngZ7H rD6ZJfFRq62+osWLfJJxZZDM8WCDpuBc6OYo1jRm0SixvYL0mw2qpNYN+BK+aUzNlNG+0NHT6tidY Bq1abaEmMipnRg==; Received: from [87.69.77.57] (port=1306 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mm9un-0002rM-8U; Sun, 14 Nov 2021 02:27:01 -0500 Date: Sun, 14 Nov 2021 09:26:48 +0200 Message-Id: <834k8fw62v.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: (message from Tor Kringeland on Sun, 14 Nov 2021 04:10:10 +0100) References: MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Tor Kringeland > Date: Sun, 14 Nov 2021 04:10:10 +0100 > > Running > > (shell-command "echo -n '悟' | pbcopy") > > or > > (shell-command "echo -n 'øøøø' | pbcopy") > > fills the clipboard with `ÊÇü' and `√∏', respectively, while if I run > the same commands in a terminal emulator outside Emacs I get back the > original input. The same happens if I run the same shell commands in > `eshell'. This happens when I run a recent build of Emacs 29 with `-Q' > on macOS Catalina. Please be specific about the "recent build" part: which commit are you using? There were some problems with the clipboard that were recently fixed. Also, do older versions of Emacs behave differently with that command? From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 07:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: Tor Kringeland , 51832@debbugs.gnu.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.16368764452404 (code B ref 51832); Sun, 14 Nov 2021 07:55:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 07:54:05 +0000 Received: from localhost ([127.0.0.1]:49049 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmAKy-0000ch-Rj for submit@debbugs.gnu.org; Sun, 14 Nov 2021 02:54:05 -0500 Received: from quimby.gnus.org ([95.216.78.240]:57844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmAKv-0000c7-Qt for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 02:54:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=hQKed/1qYG0ddxDU7OzPE5DTvMBGLWgqhn97VFEMCKM=; b=R9rJ6NZFVTYEhlClFqzbGzQG/C c7hP38aa6eKvcpRwyF/oMOPfBvgkQhk19lapthaJbK9sVV36mdTNKNKm0NiE0h6g62afwvHtn0iNz XybPpdpsS8zX1KyoNhLq9UThgyDfe++j/E6pnOWbi17iI9g/fwCuH/GHuBvxpkYKw57Q=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmAKm-0001sn-51; Sun, 14 Nov 2021 08:53:55 +0100 From: Lars Ingebrigtsen References: <834k8fw62v.fsf@gnu.org> X-Now-Playing: Schneider TM's _The 8 Of Space_: "Oh Life" Date: Sun, 14 Nov 2021 08:53:51 +0100 In-Reply-To: <834k8fw62v.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2021 09:26:48 +0200") Message-ID: <87y25r8968.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: >> Running >> >> (shell-command "echo -n =?UTF-8?Q?'=E6=82=9F'?= | pbcopy") >> >> or >> >> (shell-command "echo -n =?UTF-8?Q?'=C3=B8=C3=B8=C3=B8=C3=B8'?= | pbcopy") >> >> fills the clipboard with =?UTF-8?Q?`=C3=8A=C3=87=C3=BC'?= and =?UTF-8?Q?`=E2=88=9A=E2=88=8F',?= respectively, while if I ru [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> Running >>=20 >> (shell-command "echo -n '=E6=82=9F' | pbcopy") >>=20 >> or >>=20 >> (shell-command "echo -n '=C3=B8=C3=B8=C3=B8=C3=B8' | pbcopy") >>=20 >> fills the clipboard with `=C3=8A=C3=87=C3=BC' and `=E2=88=9A=E2=88=8F', = respectively, while if I run >> the same commands in a terminal emulator outside Emacs I get back the >> original input. The same happens if I run the same shell commands in >> `eshell'. This happens when I run a recent build of Emacs 29 with `-Q' >> on macOS Catalina. > > Please be specific about the "recent build" part: which commit are you > using? I'm seeing the same issue with the current tree on Macos. > There were some problems with the clipboard that were recently fixed. This doesn't involve Emacs' interactions with the clipboard, though -- the pbcopy command is what's putting things on the clipboard. But pbcopy's apparently misinterpreting the bytes it's getting over the pipe somehow, which is surprising, because I assumed shell-command just sent the entire string to a shell for execution. (But I haven't read the code.) --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 08:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.16368776504422 (code B ref 51832); Sun, 14 Nov 2021 08:15:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 08:14:10 +0000 Received: from localhost ([127.0.0.1]:49070 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmAeP-00019G-PL for submit@debbugs.gnu.org; Sun, 14 Nov 2021 03:14:10 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56932) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmAeO-000194-5O for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 03:14:09 -0500 Received: from [2001:470:142:3::e] (port=46998 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmAeI-0002Ez-GB; Sun, 14 Nov 2021 03:14:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=Kf7v1hBIxzMOUeIii4wL/vdbNWdlwPvlbNdOzZY7QdQ=; b=F4FJacepwbA55S4zlCEw Q+fWHyg9lMAatrN7FqF1ksHOePe5qWRBD6+opVaQDxOWGq1+krpMm561zvspGphR5SQyIRhlbbp/Q fU269oF72CwEsk5s/6i1sDj4bMx9kYfkoXSGOlUmrMH12400l0ftvW3xRhIddZaTua+zGc77kHZFT 2oGLL7c4SOnKhGhOyfRcSl/fho3P4vlAH5DO3dcsoEn+7X2KCnPeCR5yZNJmYD4d3ie+Ql2yWtbxk 61hzVexlkIJsf/pYnYNArmnLnivApXK7gIN9Mzsr/jn+5pAE5Mfiu1YZto1xhKokq4HL2nxl5Iiil yTHiL4e0AqSnPA==; Received: from [87.69.77.57] (port=4171 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmAeG-0006mA-KF; Sun, 14 Nov 2021 03:14:00 -0500 Date: Sun, 14 Nov 2021 10:13:47 +0200 Message-Id: <83mtm7upc4.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87y25r8968.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 14 Nov 2021 08:53:51 +0100) References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Tor Kringeland , 51832@debbugs.gnu.org > Date: Sun, 14 Nov 2021 08:53:51 +0100 > > >> (shell-command "echo -n '悟' | pbcopy") > >> > >> or > >> > >> (shell-command "echo -n 'øøøø' | pbcopy") > >> > >> fills the clipboard with `ÊÇü' and `√∏', respectively, while if I run > >> the same commands in a terminal emulator outside Emacs I get back the > >> original input. The same happens if I run the same shell commands in > >> `eshell'. This happens when I run a recent build of Emacs 29 with `-Q' > >> on macOS Catalina. > > > > Please be specific about the "recent build" part: which commit are you > > using? > > I'm seeing the same issue with the current tree on Macos. > > > There were some problems with the clipboard that were recently fixed. > > This doesn't involve Emacs' interactions with the clipboard, though -- > the pbcopy command is what's putting things on the clipboard. But > pbcopy's apparently misinterpreting the bytes it's getting over the pipe > somehow, which is surprising, because I assumed shell-command just sent > the entire string to a shell for execution. (But I haven't read the > code.) It could be useful to replace the pipe with redirection to a file, and see what you get when invoking the command from Emacs and from a shell prompt outside Emacs. From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 08:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, Alan Third Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.16368779034846 (code B ref 51832); Sun, 14 Nov 2021 08:19:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 08:18:23 +0000 Received: from localhost ([127.0.0.1]:49075 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmAiV-0001G6-Bq for submit@debbugs.gnu.org; Sun, 14 Nov 2021 03:18:23 -0500 Received: from quimby.gnus.org ([95.216.78.240]:58076) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmAiT-0001Ft-F1 for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 03:18:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=K0NfSL3R5um7gAQRKIUPXZvF+1DyOXiLRksh4eWKPmQ=; b=Nay2MbvRxzslGpMJei68OeJqcW eEY5+5/KmrXsiac3qQchf/HVW1xtn1B/YYdeFjpSls6ze8rZDiKFqAg+MP9Kh7JDC5F/UVSbp8+zr rnNqh62diY2io001sG1Aee7qnj1GJLiKhxQIAWf/fjr+NguUabmo5NFnNx4OaMuH5Fvc=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmAiJ-000253-Sx; Sun, 14 Nov 2021 09:18:14 +0100 From: Lars Ingebrigtsen References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> X-Now-Playing: Schneider TM's _The 8 Of Space_: "The Trip (Is The Goal)" Date: Sun, 14 Nov 2021 09:18:08 +0100 In-Reply-To: <83mtm7upc4.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2021 10:13:47 +0200") Message-ID: <87tugf881r.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > It could be useful to replace the pipe with redirection to a file, and > see what you get when invoking the command from Emacs and from a shell > prompt outside Emacs. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > It could be useful to replace the pipe with redirection to a file, and > see what you get when invoking the command from Emacs and from a shell > prompt outside Emacs. Good point. I tried that now (with "| cat > /tmp/" to get a pipe in there), and the contents that were written to file were correct utf-8. Mysterious. Could the problem be in pbcopy -- that's assuming something about the coding system when run from inside Emacs somehow? That doesn't sound very likely, but... I've added Alan to the CCs; perhaps he has some insights here. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 08:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.16368783535558 (code B ref 51832); Sun, 14 Nov 2021 08:26:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 08:25:53 +0000 Received: from localhost ([127.0.0.1]:49080 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmApl-0001Ra-5Q for submit@debbugs.gnu.org; Sun, 14 Nov 2021 03:25:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58512) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmApi-0001RM-KX for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 03:25:51 -0500 Received: from [2001:470:142:3::e] (port=47278 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmApd-0003gq-0S; Sun, 14 Nov 2021 03:25:45 -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=3QBpx5PREuaRSF7GJVycn/qkKat/O7ilXXCSbo8eccw=; b=CpRktKnK+ZQN FBv8qeIoo+ciKm0A5tXKe+0ngJEpIc6X6uHht3mWbBzjxr9cFS/0JnxDB3YFn3HI3PDpX1Mz6FQI7 1QU+7V7bvll5RunlyDsM6X/4Smf54vqnd0OLAyD5babrE0rgNjmiindZOF5IIAZbaFl/M1ONob0Fs I1ePtPScXOkye6kQjoeykOkzTrXwbOmR+PE04wOMOnfT+a1ico2t0hbhIa7ugDnJjcv9Ad5GrHyP3 gBRj4yGAuZaJHLSroGvFb6LFnzsncZAL+9QhSFpulwdrZ2M7uiLklO3A+PLqn63ll6BRl6V0LLvWd wOXQrb/Z8VZwABark/cLOw==; Received: from [87.69.77.57] (port=4888 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmApc-0000J6-KQ; Sun, 14 Nov 2021 03:25:44 -0500 Date: Sun, 14 Nov 2021 10:25:29 +0200 Message-Id: <83k0hbuosm.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87tugf881r.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 14 Nov 2021 09:18:08 +0100) References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, Alan Third > > Date: Sun, 14 Nov 2021 09:18:08 +0100 > > Eli Zaretskii writes: > > > It could be useful to replace the pipe with redirection to a file, and > > see what you get when invoking the command from Emacs and from a shell > > prompt outside Emacs. > > Good point. I tried that now (with "| cat > /tmp/" to get a pipe in > there), and the contents that were written to file were correct utf-8. > > Mysterious. Could the problem be in pbcopy -- that's assuming something > about the coding system when run from inside Emacs somehow? That > doesn't sound very likely, but... Maybe we set some locale-related environment variable, and that was confuses pbcopy when it is run from Emacs? From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 09:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163688156610938 (code B ref 51832); Sun, 14 Nov 2021 09:20:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 09:19:26 +0000 Received: from localhost ([127.0.0.1]:49119 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmBfa-0002qK-II for submit@debbugs.gnu.org; Sun, 14 Nov 2021 04:19:26 -0500 Received: from quimby.gnus.org ([95.216.78.240]:58518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmBfY-0002q7-UN for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 04:19:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=0qoHpF9v8xeVsBlLMMjcOI7eVkHYDQtHEZd0z6r005s=; b=e4KtvzBv5taiRLdSXyfHhXS8sP O02mfQNzZKFR3XwyfKDXcuRTgCSqS/Q8WXWW69f5x9d8oBXnS+Y5r/R3iIZB3hEiKl8OWYG/y4bEw 84ToHavzHL/40vkVz90+rDAAl74ZHbLEJUzL+hxG0tfd3UAZUz32EuNdVqrsy902xHqU=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmBfO-0002Ue-V6; Sun, 14 Nov 2021 10:19:17 +0100 From: Lars Ingebrigtsen References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> X-Now-Playing: Colleen's _The Tunnel and the Clearing_: "Revelation" Date: Sun, 14 Nov 2021 10:19:13 +0100 In-Reply-To: <83k0hbuosm.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2021 10:25:29 +0200") Message-ID: <87lf1r857y.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > Maybe we set some locale-related environment variable, and that was > confuses pbcopy when it is run from Emacs? I've now followed the call tree, and we end up doing: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > Maybe we set some locale-related environment variable, and that was > confuses pbcopy when it is run from Emacs? I've now followed the call tree, and we end up doing: (call-process-region (point) (point) shell-file-name nil (current-buffer) nil shell-command-switch "echo foo=F0=9F=98=80bar | pbcopy") And that fails, too. So it's not something that shell-command sets up (if it's a locale-related thing). Hm... Oh! I thought the original report said that this worked if run under M-x shell. But it doesn't -- I get the same garbled selection. (And it works fine in a shell outside Emacs.) So it could indeed be a locale setting in Emacs that's making pbcopy do the wrong thing.=20 --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 09:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163688239212371 (code B ref 51832); Sun, 14 Nov 2021 09:34:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 09:33:12 +0000 Received: from localhost ([127.0.0.1]:49126 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmBst-0003DT-Qw for submit@debbugs.gnu.org; Sun, 14 Nov 2021 04:33:11 -0500 Received: from quimby.gnus.org ([95.216.78.240]:58580) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmBsr-0003DC-8k for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 04:33:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=xgvp9w1PJIx4swWhQE1vUR0KRAz32hnpuAldii29krg=; b=CeUMP24U4iOkMGD1XQqIySiZbM 0oGPE3zCbWyx9EkLZHbFGbIEas0poQu5w6p6oQpnw0Iq2wBakIIOmJi0vit7F/N7QdfCCfS5/fwqI 15uw09gWHGO9BWkPIBTw3vVqVFT5m3kcDuHV1O452N8P4adddpzLMZWEWR4b5XrUdhFo=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmBsh-0002Yl-20; Sun, 14 Nov 2021 10:33:02 +0100 From: Lars Ingebrigtsen References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> X-Now-Playing: Colleen's _The Tunnel and the Clearing_: "The Tunnel and the Clearing" Date: Sun, 14 Nov 2021 10:32:58 +0100 In-Reply-To: <83k0hbuosm.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2021 10:25:29 +0200") Message-ID: <87h7cf84l1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: It's a bug in... the locale settings. Testing in the console, echo =?UTF-8?Q?f=C3=B3o?= | LANG=en_US.utf-8 pbcopy works fine, but Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) It's a bug in... the locale settings. Testing in the console, echo f=C3=B3o | LANG=3Den_US.utf-8 pbcopy works fine, but echo f=C3=B3o | LANG=3Den_NO.utf-8 pbcopy doesn't. And that's the setting in Emacs for me. It's correct that I am in Norway and that I'm using the English locale, but there's no such locale as en_NO.utf-8. Didn't Emacs on Macos recently get some locale-related changes? --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 09:47:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163688318013662 (code B ref 51832); Sun, 14 Nov 2021 09:47:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 09:46:20 +0000 Received: from localhost ([127.0.0.1]:49141 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmC5b-0003YI-PJ for submit@debbugs.gnu.org; Sun, 14 Nov 2021 04:46:19 -0500 Received: from quimby.gnus.org ([95.216.78.240]:58824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmC5a-0003Y4-0J for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 04:46:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=wgTsLpr4KByPItnkhmOuaUjL3AhXYXGGTmIGdpTHIWk=; b=c5ANLF0tG/Dd4WVUoylY33nJCn EaiRPbhyi6fy1NyuO0X1KRCwY8YcqfiAIZPgzeMO9/BYyxGmHrT4uLTdpllc/TUTP5oiLSx3xNSOy wt0RLJAJ9jUH11yZDPt/gRobykcc1EoBPK5E7H61/waPD6tJwQF99E3XtE6k0H2l2Sfw=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmC5Q-0002eP-2t; Sun, 14 Nov 2021 10:46:10 +0100 From: Lars Ingebrigtsen References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> X-Now-Playing: Colleen's _The Tunnel and the Clearing_: "Hidden in the Current" Date: Sun, 14 Nov 2021 10:46:05 +0100 In-Reply-To: <87h7cf84l1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 14 Nov 2021 10:32:58 +0100") Message-ID: <87czn383z6.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > doesn't. And that's the setting in Emacs for me. It's correct that I > am in Norway and that I'm using the English locale, but there's no such > locale as en_NO.utf-8. > > Didn't Emacs on Macos rece [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Lars Ingebrigtsen writes: > doesn't. And that's the setting in Emacs for me. It's correct that I > am in Norway and that I'm using the English locale, but there's no such > locale as en_NO.utf-8. > > Didn't Emacs on Macos recently get some locale-related changes? It's this code, I guess, from 2016, so it's not recent: NSLocale *locale = [NSLocale currentLocale]; NSTRACE ("ns_init_locale"); @try { /* It seems macOS should probably use UTF-8 everywhere. 'localeIdentifier' does not specify the encoding, and I can't find any way to get the OS to tell us which encoding to use, so hard-code '.UTF-8'. */ NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", [locale localeIdentifier]]; /* Set LANG to locale, but not if LANG is already set. */ setenv("LANG", [localeID UTF8String], 0); } And... it's a Macos bug? Googling a bit seems to say that this does indeed return invalid locale identifiers -- just language glued together with the country, resulting in identifiers that doesn't match any locales the OS knows about. So... I don't know what to do about that. Is there a way to check that the identifier is valid? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 10:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163688594018605 (code B ref 51832); Sun, 14 Nov 2021 10:33:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 10:32:20 +0000 Received: from localhost ([127.0.0.1]:49240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmCo7-0004q1-NT for submit@debbugs.gnu.org; Sun, 14 Nov 2021 05:32:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45242) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmCo5-0004po-Vf for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 05:32:18 -0500 Received: from [2001:470:142:3::e] (port=50364 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmCnz-0000Jv-TA; Sun, 14 Nov 2021 05:32: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=lwhqPFNi9x8sxUJdOrNtI7TSOFC65832rSsa54eAWlY=; b=DfooETk42Bgm NDGMgXpTX36c1TxPE5+/WNy0nVPex5zWLtSaQjIG8LEsi0Yj1DGOFIeDskzfHgx6SPxTJbqprUDWj IlK39i4mBpQ6qzJP1YQD1Sw18SeEL3+Gb58hQm1AZDaR06VJ6PBfkQeXzTPZ8WY21DTJcuSjsg77o DrjLVxEcku2nzvJMXzomPCn2kVAvSDy+SGQAv1QtLaVpbeQ9qEd1aOhETppMqCrRTbi4R+X/u4R8R ZVoYrFttJ/gqqwV7SURCtebm748vJxGirBNFplB8hp2JpOtAb+PaXndF3Ryol1FVlcOjA7fb0ikeh +yIe2EeZkuIcWiVajid6Xg==; Received: from [87.69.77.57] (port=4815 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmCny-0003XM-T1; Sun, 14 Nov 2021 05:32:11 -0500 Date: Sun, 14 Nov 2021 12:31:57 +0200 Message-Id: <83h7cfuixu.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87czn383z6.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 14 Nov 2021 10:46:05 +0100) References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, alan@idiocy.org > Date: Sun, 14 Nov 2021 10:46:05 +0100 > > NSLocale *locale = [NSLocale currentLocale]; > > NSTRACE ("ns_init_locale"); > > @try > { > /* It seems macOS should probably use UTF-8 everywhere. > 'localeIdentifier' does not specify the encoding, and I can't > find any way to get the OS to tell us which encoding to use, > so hard-code '.UTF-8'. */ > NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", > [locale localeIdentifier]]; > > /* Set LANG to locale, but not if LANG is already set. */ > setenv("LANG", [localeID UTF8String], 0); > } > > And... it's a Macos bug? Googling a bit seems to say that this does > indeed return invalid locale identifiers -- just language glued together > with the country, resulting in identifiers that doesn't match any > locales the OS knows about. > > So... I don't know what to do about that. Is there a way to check that > the identifier is valid? I asked once why we push LANG into the environment, instead of calling setlocale, which would only affect Emacs. I don't think I saw an answer to that question, or did I miss it? From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Philipp Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 10:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51832@debbugs.gnu.org, Lars Ingebrigtsen , tor.a.s.kringeland@ntnu.no, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163688650919498 (code B ref 51832); Sun, 14 Nov 2021 10:42:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 10:41:49 +0000 Received: from localhost ([127.0.0.1]:49250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmCxI-00054Q-VW for submit@debbugs.gnu.org; Sun, 14 Nov 2021 05:41:49 -0500 Received: from mail-wr1-f43.google.com ([209.85.221.43]:36429) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmCxG-00054B-FS for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 05:41:47 -0500 Received: by mail-wr1-f43.google.com with SMTP id s13so24410363wrb.3 for <51832@debbugs.gnu.org>; Sun, 14 Nov 2021 02:41:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=V54mFRfVr5Jxducvoi+ce83BCUXvDKO3WQsGQ9qtVhQ=; b=hZnnym+ygJIruVe+Ser50NnXa0CNE56aU1tHogxrweZvdcC9mO5hnnbxOG0PX/FEXe zod+bf+mWzLEmGqlEEK8TzYD40s+Xc7qUHRpx4x28L8g/JJJ+o+BMCqqvvlA1pC27Ljw KZzAkZXaJUKqodK7E0qTJwhYOOzIZ/n4LS2JlykF+UrTM0DqRvXmfOGg2nke6TnMWMcd dn1VsZP34ZN16Q45mbVbokaRbKNnUKScr5Tu5QdhRXVAZSv5dkcuVyl7C1jCXqnUOwwR 8ICrvO3zCx9LvBZtxuHmpfQGTSaoOwB2rppwKSKB5IPriUy7PpNpwg/WCrnTUojLcw4o mYcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=V54mFRfVr5Jxducvoi+ce83BCUXvDKO3WQsGQ9qtVhQ=; b=2g6xQ5kxK/ksxBWiCUM6vKGQqSCJ+jr5fd9H8wr4U1hZOBATx3aiDhDtb6qafJ5z06 v7AnbHufgsriKKwgoID6Lii/tF/uQg6Ldq1S3ksNk/dXh+vzKjGCQlIglgCBYzJVI7M0 LXDl3IyDMadLEtfoUypnPr+BYUEq4/Ee606zyKgtaCEJslkH/72gCgo6rHmnPhplcREa xhKx37h5HHGVXcphWHOBkYJ6YK0aKE/Mbvx0hkRwa0QYuyr1Br7F2YBJvj6P8CjPLH0S JyaB5ZfvZdP9kTQYwtrUdKir6hhPGyOOGfy2H3J4Yb3m1FLOi2wXnVRJ9IJf3VaX2/0M 22Mg== X-Gm-Message-State: AOAM533jPKpaQBLC2uMV01o+h9pDDhdKPMdqg6R75e/4mmmvrhDyLiTz BkddC6udjRHVUN/J46lxO48= X-Google-Smtp-Source: ABdhPJzhXMRnZPwpqC3B/VQl5jQQcQC7H7bLlfJE7rruJwIwLxgfBNoLKM1VBpDD14J+CDGBqt4nag== X-Received: by 2002:a5d:584e:: with SMTP id i14mr37705065wrf.386.1636886500447; Sun, 14 Nov 2021 02:41:40 -0800 (PST) Received: from smtpclient.apple (p57aafa06.dip0.t-ipconnect.de. [87.170.250.6]) by smtp.gmail.com with ESMTPSA id h16sm12077922wrm.27.2021.11.14.02.41.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 02:41:40 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) From: Philipp In-Reply-To: <83h7cfuixu.fsf@gnu.org> Date: Sun, 14 Nov 2021 11:41:38 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) > Am 14.11.2021 um 11:31 schrieb Eli Zaretskii : >=20 >> From: Lars Ingebrigtsen >> Cc: tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org, = alan@idiocy.org >> Date: Sun, 14 Nov 2021 10:46:05 +0100 >>=20 >> NSLocale *locale =3D [NSLocale currentLocale]; >>=20 >> NSTRACE ("ns_init_locale"); >>=20 >> @try >> { >> /* It seems macOS should probably use UTF-8 everywhere. >> 'localeIdentifier' does not specify the encoding, and I can't >> find any way to get the OS to tell us which encoding to use, >> so hard-code '.UTF-8'. */ >> NSString *localeID =3D [NSString stringWithFormat:@"%@.UTF-8", >> [locale localeIdentifier]]; >>=20 >> /* Set LANG to locale, but not if LANG is already set. */ >> setenv("LANG", [localeID UTF8String], 0); >> } >>=20 >> And... it's a Macos bug? Googling a bit seems to say that this does >> indeed return invalid locale identifiers -- just language glued = together >> with the country, resulting in identifiers that doesn't match any >> locales the OS knows about. >>=20 >> So... I don't know what to do about that. Is there a way to check = that >> the identifier is valid? >=20 > I asked once why we push LANG into the environment, instead of calling > setlocale, which would only affect Emacs. I don't think I saw an > answer to that question, or did I miss it? >=20 AIUI the intention is that this should affect subprocesses started from = Emacs. At least that's how I interpret the comment /* macOS doesn't set any environment variables for the locale when run from the GUI. Get the locale from the OS and set LANG. */ From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 10:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Cc: 51832@debbugs.gnu.org, larsi@gnus.org, tor.a.s.kringeland@ntnu.no, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163688739621071 (code B ref 51832); Sun, 14 Nov 2021 10:57:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 10:56:36 +0000 Received: from localhost ([127.0.0.1]:49260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmDBb-0005Tn-NX for submit@debbugs.gnu.org; Sun, 14 Nov 2021 05:56:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:48406) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmDBa-0005TX-BX for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 05:56:34 -0500 Received: from [2001:470:142:3::e] (port=50974 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmDBU-0002y3-3X; Sun, 14 Nov 2021 05:56:28 -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=Tuwxb9KX8GRSmCyjBuap2ljWvViI4u5jkJ0ANzcjQh8=; b=Zw/n0Ne4OaaV 6LlSN8OlRWNbH2v2dH/k7aYefjd2GNRCOhbldgVWyfmW4WBsAFlmyoFlqeosHujknPfLtsGYsl+Uv 1BmMtS3qUyJJbHUVNYef3f/ctOhittnDJezOmPDWdIlqna9dNiksvYwXE7tjTJNYcC+fP4BBJFsyI ckwdLtbg3FmuW1BCDzFeT3RQSqGDDLkqCB6AOK9t+/NZmdX9no7x7PT7QUory64ngl+91P+QPw/hb fmgUEU389lU1GPybk4gNMeW+Xcrimplq+l+XNygSHAZj+MsE8fqR12KprizDH7DmMO0Ql4KekKh60 ei9U0RQVq5KdnUORqZQWnQ==; Received: from [87.69.77.57] (port=2331 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmDBT-0001sQ-Mt; Sun, 14 Nov 2021 05:56:28 -0500 Date: Sun, 14 Nov 2021 12:56:14 +0200 Message-Id: <83czn3uhtd.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> (message from Philipp on Sun, 14 Nov 2021 11:41:38 +0100) References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philipp > Date: Sun, 14 Nov 2021 11:41:38 +0100 > Cc: Lars Ingebrigtsen , > tor.a.s.kringeland@ntnu.no, > 51832@debbugs.gnu.org, > alan@idiocy.org > > > I asked once why we push LANG into the environment, instead of calling > > setlocale, which would only affect Emacs. I don't think I saw an > > answer to that question, or did I miss it? > > > > AIUI the intention is that this should affect subprocesses started from Emacs. At least that's how I interpret the comment > > /* macOS doesn't set any environment variables for the locale when run > from the GUI. Get the locale from the OS and set LANG. */ Why is that needed? And if it is needed, how come we are setting LANG to an invalid locale and the system somehow sets it to the correct locale? From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 11:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51832@debbugs.gnu.org, Philipp , tor.a.s.kringeland@ntnu.no, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163688881623417 (code B ref 51832); Sun, 14 Nov 2021 11:21:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 11:20:16 +0000 Received: from localhost ([127.0.0.1]:49277 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmDYW-00065b-7H for submit@debbugs.gnu.org; Sun, 14 Nov 2021 06:20:16 -0500 Received: from quimby.gnus.org ([95.216.78.240]:59554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmDYU-00065K-Cx for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 06:20:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gXwYjAg93njvhtNtN4xW0FrqTk4T6N44jrDaJheRN7U=; b=lgDsRMfIgusAWxDWzuAyEWtXux QujaI9jp25F29JDhXRBuhMDqroQegb3n0YemniZEo6LrcACG6l394Xke2RM8uagJ1jpsjGO0my2vm MGU60yQ53mBGyvXDinYX6i+iXMFB47+2LMwjNCiDpHc10Y30xpICrcSCZmW2uxP4viyY=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmDYJ-0003Fg-OF; Sun, 14 Nov 2021 12:20:06 +0100 From: Lars Ingebrigtsen References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> X-Now-Playing: Mia Doi Todd's _Music Life_: "Daughter of Hope" Date: Sun, 14 Nov 2021 12:20:03 +0100 In-Reply-To: <83czn3uhtd.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2021 12:56:14 +0200") Message-ID: <87zgq76l24.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Eli Zaretskii writes: > And if it is needed, how come we are setting LANG to an invalid locale > and the system somehow sets it to the correct locale? LANG outside of Emacs is "" for me on Macos. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: > And if it is needed, how come we are setting LANG to an invalid locale > and the system somehow sets it to the correct locale? LANG outside of Emacs is "" for me on Macos. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Philipp Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 11:49:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 51832@debbugs.gnu.org, Eli Zaretskii , tor.a.s.kringeland@ntnu.no, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163689051026945 (code B ref 51832); Sun, 14 Nov 2021 11:49:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 11:48:30 +0000 Received: from localhost ([127.0.0.1]:49315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmDzq-00070X-Gr for submit@debbugs.gnu.org; Sun, 14 Nov 2021 06:48:30 -0500 Received: from mail-wr1-f42.google.com ([209.85.221.42]:40885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmDzp-00070H-IS for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 06:48:30 -0500 Received: by mail-wr1-f42.google.com with SMTP id r8so24542719wra.7 for <51832@debbugs.gnu.org>; Sun, 14 Nov 2021 03:48:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=bh+jVpl7udP+AnE8eULQpHNh+yaDPAdYEV5a8oDWwps=; b=PPtZ11S6/kQWL+wgE4Tttgw1UGWL0B3aahHSdkOxbUjN/lI4jQRVEh0vpoVlsUBHm3 LC3IkdrbqYz+/lgHb9prEnDQox5CEUF/m3Sk8vJP1Gj3LK7jKtG9gWTcdz4Z2G8NNRRU UXVLbY1TgB6BIaxt7ZSfQBKA+qyD3rMqKPMy+TW+qJJTSlalM0UhFn2zejuOACn77PvW SEsm53nemhDpvhbtkHnASrP6VgqS/jxTvl/LAVxU2yZ/52cya9QrMjooKsdDvibhXo4Q W+6ql+EJJksNFhMITnpoEpxpZ9/fD1X90Nvty0lSZodKX1z/3aQLxzXICm3628l2Xerj vNrg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=bh+jVpl7udP+AnE8eULQpHNh+yaDPAdYEV5a8oDWwps=; b=nU90nJly7T2MOaAgMLt7hWKRaz1Bw9t/9fQOfgru6J6XDg1AgrFoIn0+8u0TEnE6Q4 B2nV6hy0U9uRiJlfcmyeittj/tb2Uer60ExFYNkc61bmec8yCnIGZ4Gs1T796goEJWBD 6eu7b4NwAdBrZ/5Qo9GrPbrNj1DhEplKjfqfnS/Ks7CSHetezD/gCtND6xZMFmkZro78 yHzgvtrHv0HSSMpagFKgQacA0iKuzKu1st9NX0A8/xb4JJPYuOVpQEJm27vYlZsLv7Y0 BghUzykoInLuR/TucvB/Uy/zkyRtahlKv2ZbLb7eVs/gaHDSSLm0NKfhg5t781eOWdlC 35jw== X-Gm-Message-State: AOAM533Ppsg9wWG8yBJX2NEtXgj6akVi/snX7c04kUMCc6A2O/SQll8k 7hwpKsMjA5xjRHemXczTENw= X-Google-Smtp-Source: ABdhPJz62IxeMGhyd6QMQSUGAf88ruptX9dYO9+D9rdbeb7tfdjeMawVFDFaGP4B36blIZMgFgrDhQ== X-Received: by 2002:a05:6000:1788:: with SMTP id e8mr37228105wrg.45.1636890503527; Sun, 14 Nov 2021 03:48:23 -0800 (PST) Received: from smtpclient.apple (p57aafa06.dip0.t-ipconnect.de. [87.170.250.6]) by smtp.gmail.com with ESMTPSA id z12sm11046824wrv.78.2021.11.14.03.48.22 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 03:48:23 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) From: Philipp In-Reply-To: <87zgq76l24.fsf@gnus.org> Date: Sun, 14 Nov 2021 12:48:21 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <22556E9A-A4EA-4A25-AB42-B7ADD3681730@gmail.com> References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87zgq76l24.fsf@gnus.org> X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) > Am 14.11.2021 um 12:20 schrieb Lars Ingebrigtsen : >=20 > Eli Zaretskii writes: >=20 >> And if it is needed, how come we are setting LANG to an invalid = locale >> and the system somehow sets it to the correct locale? >=20 > LANG outside of Emacs is "" for me on Macos. For reference, on my Monterey system, only the following variables are = initially set when launching Emacs from Finder: __CF_USER_TEXT_ENCODING=3D0x1F5:0x0:0x3 __CFBundleIdentifier=3Dorg.gnu.Emacs COMMAND_MODE=3Dunix2003 DISPLAY=3D/private/tmp/com.apple.launchd.[...]/org.macosforge.xquartz:0 HOME=3D/Users/p LOGNAME=3Dp PATH=3D/usr/bin:/bin:/usr/sbin:/sbin SHELL=3D/opt/homebrew/bin/bash SSH_AUTH_SOCK=3D/private/tmp/com.apple.launchd.[...]/Listeners TMPDIR=3D/var/folders/hw/[...]/T/ USER=3Dp XPC_FLAGS=3D0x0 XPC_SERVICE_NAME=3Dapplication.org.gnu.Emacs.[...] From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 12:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 51832@debbugs.gnu.org, p.stephani2@gmail.com, tor.a.s.kringeland@ntnu.no, alan@idiocy.org Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.16368922325844 (code B ref 51832); Sun, 14 Nov 2021 12:18:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 12:17:12 +0000 Received: from localhost ([127.0.0.1]:49341 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmERc-0001WC-Ff for submit@debbugs.gnu.org; Sun, 14 Nov 2021 07:17:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmERZ-0001Vy-Jk for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 07:17:11 -0500 Received: from [2001:470:142:3::e] (port=52600 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmERT-0004i9-JN; Sun, 14 Nov 2021 07:17:03 -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=weE+MIhNn+pMYfU1NAPZ7RPG1yRtGFZIcdh0CGGu9Fs=; b=muGJLF3iiVck e+HbJJyEq3Nqxdnu3X9FDMuYKxAdwwU1ThpUDkdlkqKb+VaFphaMs+9N76hCwG+yk2cJLs1+1y84R OTwbuKIgWXJyHlYeNv56QHdCBSaFkrJ+FPG3EAbF7Z1ervh4DfK95GjeFApwIJJcNiTPPN1/FtfF0 dMuyc8vvgbY5ZzM6ZWkcpzl698d1EXFFOp4+xtj8oEZhn9xhGlR9Dx3Zs5NZbvOaK+Akt7AY8DAnU ou+aD3t6IEYnQF4sDUSpZs/q12YRZoMwhspazn+wWfpS2Rz172LNF8IFrdPkNlSFnRVlt76KYDt+G tEDBSQmpqiOVkEXXG7i5qQ==; Received: from [87.69.77.57] (port=3251 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmERT-0002OJ-6E; Sun, 14 Nov 2021 07:17:03 -0500 Date: Sun, 14 Nov 2021 14:16:49 +0200 Message-Id: <838rxrue32.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87zgq76l24.fsf@gnus.org> (message from Lars Ingebrigtsen on Sun, 14 Nov 2021 12:20:03 +0100) References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87zgq76l24.fsf@gnus.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Lars Ingebrigtsen > Cc: Philipp , tor.a.s.kringeland@ntnu.no, > 51832@debbugs.gnu.org, alan@idiocy.org > Date: Sun, 14 Nov 2021 12:20:03 +0100 > > Eli Zaretskii writes: > > > And if it is needed, how come we are setting LANG to an invalid locale > > and the system somehow sets it to the correct locale? > > LANG outside of Emacs is "" for me on Macos. And that doesn't work when running applications from inside Emacs? If it does work, why do we set LANG in Emacs? From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 12:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 51832@debbugs.gnu.org, Philipp , larsi@gnus.org, tor.a.s.kringeland@ntnu.no Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163689311113571 (code B ref 51832); Sun, 14 Nov 2021 12:32:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 12:31:51 +0000 Received: from localhost ([127.0.0.1]:49360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmEfm-0003WR-U5 for submit@debbugs.gnu.org; Sun, 14 Nov 2021 07:31:51 -0500 Received: from outbound.soverin.net ([116.202.126.228]:60473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmEfk-0003Pl-HU for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 07:31:49 -0500 Received: from smtp.soverin.net (unknown [10.10.3.28]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 3A2274F; Sun, 14 Nov 2021 12:31:42 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.142]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1636893101; bh=uEFTdFNb+caR4I515RUlWxuO6KbsfgNZdnWwftFbgK4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=jLBCl8cVm29TnqSLX0kPCYbt1cAmSW9SoiRraYcKTf6Vn0EmJz01zmjZF7ITCoWzA XDCmFqFatTxI8m3ADCf3HCHwJMcUZyHZqcdx8z6pf2r+x20sMPtxCqLx+XiGH91SH9 +DzgwiSNVgJQU48xLe4vygLyolPUPu0cyHDaaANBSSoCO9KYoiRb0oX8t677+zuW5t ZI40gOcjMcM8eHYtjyFqXsSKGnPBZ9fg2mWIvXHMQ6xMrqMb0CoT99dYHOvmVeq2rk tCtjQULN2poyyLHYnf8OKoKmQ8zz1fBma5qaCGOxOZFo1GYl/PtbXeS9xmC2fpHi6E FhygvythkjBRw== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1mmEfY-000LqD-AC; Sun, 14 Nov 2021 12:31:36 +0000 Date: Sun, 14 Nov 2021 12:31:36 +0000 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Eli Zaretskii , Philipp , larsi@gnus.org, tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="LJYFIxCLPI4FdEWl" Content-Disposition: inline In-Reply-To: <83czn3uhtd.fsf@gnu.org> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --LJYFIxCLPI4FdEWl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Nov 14, 2021 at 12:56:14PM +0200, Eli Zaretskii wrote: > > From: Philipp > > Date: Sun, 14 Nov 2021 11:41:38 +0100 > > Cc: Lars Ingebrigtsen , > > tor.a.s.kringeland@ntnu.no, > > 51832@debbugs.gnu.org, > > alan@idiocy.org > > > > > I asked once why we push LANG into the environment, instead of calling > > > setlocale, which would only affect Emacs. I don't think I saw an > > > answer to that question, or did I miss it? > > > > > > > AIUI the intention is that this should affect subprocesses started from Emacs. At least that's how I interpret the comment > > > > /* macOS doesn't set any environment variables for the locale when run > > from the GUI. Get the locale from the OS and set LANG. */ > > Why is that needed? > > And if it is needed, how come we are setting LANG to an invalid locale > and the system somehow sets it to the correct locale? macOS itself doesn't set any locale related environment variables, any application that is running UNIX style commands is expected to set them itself. The UNIX commands don't themselves pick up the locale from the system, they rely on the environment variables. In other words, as with anything UNIXy on macOS, it's a badly thought out mess. It seems suspicious to me that we've had this code since Emacs 26, but only in the last few weeks we've had two complaints about it. Having dug out my Mac I can't convince it to show any of the errors that have been reported, so I suspect either the latest version of macOS has made the locale handling much more strict or has removed a lot of locales. I've attached a patch that may do something towards preventing this problem but ultimately this is a convenience to give a best guess at choosing the correct dictionary, date format, etc. If we can't easily fix it then we can drop it and tell people to set it in their init.el themselves. -- Alan Third --LJYFIxCLPI4FdEWl Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0001-Only-set-LANG-if-the-ID-is-valid.patch" >From ff67f1cbee3c0b1fd5b1a0d725e40158190cfe55 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 14 Nov 2021 11:32:54 +0000 Subject: [PATCH] Only set LANG if the ID is valid * src/nsterm.m (ns_init_locale): Check the provided locale identifier is available before trying to use it. --- src/nsterm.m | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 1f17a30272..566537e8a1 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -535,21 +535,25 @@ - (NSColor *)colorUsingDefaultColorSpace NSTRACE ("ns_init_locale"); - @try + if ([[NSLocale availableLocaleIdentifiers] + containsObject:[locale localeIdentifier]]) { - /* It seems macOS should probably use UTF-8 everywhere. - 'localeIdentifier' does not specify the encoding, and I can't - find any way to get the OS to tell us which encoding to use, - so hard-code '.UTF-8'. */ - NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", - [locale localeIdentifier]]; - - /* Set LANG to locale, but not if LANG is already set. */ - setenv("LANG", [localeID UTF8String], 0); - } - @catch (NSException *e) - { - NSLog (@"Locale detection failed: %@: %@", [e name], [e reason]); + @try + { + /* It seems macOS should probably use UTF-8 everywhere. + 'localeIdentifier' does not specify the encoding, and I can't + find any way to get the OS to tell us which encoding to use, + so hard-code '.UTF-8'. */ + NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", + [locale localeIdentifier]]; + + /* Set LANG to locale, but not if LANG is already set. */ + setenv("LANG", [localeID UTF8String], 0); + } + @catch (NSException *e) + { + NSLog (@"Locale detection failed: %@: %@", [e name], [e reason]); + } } } -- 2.33.0 --LJYFIxCLPI4FdEWl-- From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 13:42:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third Cc: 51832@debbugs.gnu.org, Eli Zaretskii , Philipp , tor.a.s.kringeland@ntnu.no Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163689731322958 (code B ref 51832); Sun, 14 Nov 2021 13:42:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 13:41:53 +0000 Received: from localhost ([127.0.0.1]:49473 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmFlZ-0005yE-BI for submit@debbugs.gnu.org; Sun, 14 Nov 2021 08:41:53 -0500 Received: from quimby.gnus.org ([95.216.78.240]:60876) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmFlX-0005y1-DL for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 08:41:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=FMwC9t0jNRYvL8T0cNgOYvctd6LQh11VFn1hm6i+ldA=; b=eV9/kES7jVvhchme8XqUw6wGRR iYYrFmGMT6mR4nMeKA+uBYJ7uiCJW3qPjsspqiBktbICKjMdl4V7U1vKACC4EPRu08Tq+4HMl5AHK kvVTXxdDv+YtBduhYLWAdb+O6rVdLfqoe0wmPgBkM7loOtw/Gs/+aTZPpkKESZZR4sQg=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmFlN-00049Z-GS; Sun, 14 Nov 2021 14:41:44 +0100 From: Lars Ingebrigtsen References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAMFBMVEUpGyE1IihKIyxG HCYjGR03GyMaFhkwExpiUFSPfoGonJ2IdXgTDRHs6ekeGyD///+bzDKlAAAAAWJLR0QPGLoA2QAA AAd0SU1FB+ULDg0oK+RrogoAAAGeSURBVDjLvc+/S8NAFAfwJ6ROCtYf/4ClIIUOGrpHOKpIh1Y5 iluF8HAIHYrFruJQrf9AFycHRewmWNFCp+AQHNyq5H/xvbskTWu6iPggueR98n13AZhLp9PL61Fl NukduKbAJFjivgUEK+ZW2DcLUpY1cMQ0FWVolRFAJb0mzbAoICGAFD0fxKAMhmWAICSQEwEhBCcU 6ExB7WAwcCIS7lOAwAKbISXHpQOUsHhaDHgDIYoMhhpWCQMKkBY6HEurrfsKEIFPLNTPdJvBxjSI QahPAKqdqE8BBl2QOszqX1MBHhVKo98EHUEGXhVYrTtKVIeGCiDYRTsA+ZyVsvmi+wh0FW0N+fNs Y/AYA1SR1GnuZr83Gup+AEw7na/Pnv9kTIF1lPNHvn9WEzgJpcuri8F9+8TAKdjuGqfXbRkOGsNG SUD+djXqR+DYtrX3Yf0EKnt3NMQkwIWeSAax+Jo4Cu23h+QElvpuMuDxjATW5mcA4v9B8S/3qP8S 3tWzyzcntofjuY7n0cK3enBcSnjciQqRL05MtKlcz3UdmvoNPQmJlagPBfIAAAAldEVYdGRhdGU6 Y3JlYXRlADIwMjEtMTEtMTRUMTM6NDA6NDMrMDA6MDDfGNS1AAAAJXRFWHRkYXRlOm1vZGlmeQAy MDIxLTExLTE0VDEzOjQwOjQzKzAwOjAwrkVsCQAAAABJRU5ErkJggg== X-Now-Playing: Burial's _Chemz_: "Dolphinz" Date: Sun, 14 Nov 2021 14:41:38 +0100 In-Reply-To: (Alan Third's message of "Sun, 14 Nov 2021 12:31:36 +0000") Message-ID: <87v90u7t2l.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Third writes: > I've attached a patch that may do something towards preventing this > problem but ultimately this is a convenience to give a best guess at > choosing the correct dictionary, date format, etc. If we [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Third writes: > I've attached a patch that may do something towards preventing this > problem but ultimately this is a convenience to give a best guess at > choosing the correct dictionary, date format, etc. If we can't easily > fix it then we can drop it and tell people to set it in their init.el > themselves. That didn't fix the issue for me, I'm afraid -- with that patch, LANG is still the invalid en_NO.UTF-8 for me. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Philipp Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 14:24:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 51832@debbugs.gnu.org, Alan Third , Eli Zaretskii , tor.a.s.kringeland@ntnu.no Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163689979327406 (code B ref 51832); Sun, 14 Nov 2021 14:24:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 14:23:13 +0000 Received: from localhost ([127.0.0.1]:49551 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGPZ-00077x-DG for submit@debbugs.gnu.org; Sun, 14 Nov 2021 09:23:13 -0500 Received: from mail-wr1-f44.google.com ([209.85.221.44]:35670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGPW-00077i-QU for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 09:23:11 -0500 Received: by mail-wr1-f44.google.com with SMTP id i5so25211796wrb.2 for <51832@debbugs.gnu.org>; Sun, 14 Nov 2021 06:23:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nmb4HJu50Fg+8QUmdviVEzD/GJQr8h4GFFBiKY2vj0w=; b=T8my6ai8WroIPfRgKQh8ZrD159GhejiFwPcj48Z2RV8UfxDvVLIgljZBvm+adH3XlR tAU8RdsVbYpNswF6JCz2epvC+3vaikYSMpaWCbWPbEk1RAPYlHRJCNYFzGLPGLBD7+tI 3US90U7FnEHSHBod3hllQuO3cAFrVKkfYXdWcW9BGOvruHootN3NTe98D4H2gghqxg9d 5N+KX+ryx4ZKonGpce1HkFPSHJy6HBYA7Dx/NSgdTvhv+Gh4+G/9/fH0uOVIC93tAUbM UQrEaDUN2DnIu2fUS22RbKMElpcO4BEX1qiU6QOH5/JogCAc6PHKBYJLqggBY/EOZH+p u0PQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=nmb4HJu50Fg+8QUmdviVEzD/GJQr8h4GFFBiKY2vj0w=; b=Lhnvm9SlHaD6Gv6WEEnOfjL4YhrM6Hx2GlTWKOqI97PKzkE6wFgvYISCopu7yqY0nF NeVoFJV0dyypk4y4zsTAEPxrLBt4iqUIgtIczwd3DZ2jp8JFNQLjeoqs006DTkjetglJ 68R22jmcNwFKygbmDKp1suKhNoSDKRqYRi/c3o349WiuHWkZUtcJk3w/hu0yDxz/KUCE aRJF1M2NL0n5qr5KIKGCpulKVPPdiRm6qPN7SabdbD6jLBqmb0S8t62ln/0LdOIVqI4o alrvbBKqN64mxBHnhcq63Cp8b8XlSYwI3Tz3gKjIEIWR5PHAEDE84TvH3aQJGY3XKAqz ituQ== X-Gm-Message-State: AOAM532hPL4Lz9qTlq6Qnfz2pK+tLKw0SYNOtK5lIlRr7Dn6u1D9hxqw 70BssjYRaO5EjAG0xP9ts6w= X-Google-Smtp-Source: ABdhPJzQjRuEOjwT52+YHCe8u/x3JrBevQjyfYPWU02+BHqtveizQE9qQvX4KkQqdpoKWyvwX2CUCg== X-Received: by 2002:adf:dc0a:: with SMTP id t10mr38731869wri.8.1636899784884; Sun, 14 Nov 2021 06:23:04 -0800 (PST) Received: from smtpclient.apple (p57aafa06.dip0.t-ipconnect.de. [87.170.250.6]) by smtp.gmail.com with ESMTPSA id q26sm11333223wrc.39.2021.11.14.06.23.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 14 Nov 2021 06:23:04 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 15.0 \(3693.20.0.1.32\)) From: Philipp In-Reply-To: <87v90u7t2l.fsf@gnus.org> Date: Sun, 14 Nov 2021 15:23:03 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87v90u7t2l.fsf@gnus.org> X-Mailer: Apple Mail (2.3693.20.0.1.32) X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) > Am 14.11.2021 um 14:41 schrieb Lars Ingebrigtsen : >=20 > Alan Third writes: >=20 >> I've attached a patch that may do something towards preventing this >> problem but ultimately this is a convenience to give a best guess at >> choosing the correct dictionary, date format, etc. If we can't easily >> fix it then we can drop it and tell people to set it in their init.el >> themselves. >=20 > That didn't fix the issue for me, I'm afraid -- with that patch, LANG = is > still the invalid en_NO.UTF-8 for me. Maybe we should add similar logic as iTerm2 = (https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f2754= 1740bf6/sources/PTYSession.m#L7107): create the locale identifier from = language code and country code instead of the current locale identifier, = and use setlocale (or better, newlocale) to check whether it's valid, = and fall back to en_US.UTF-8 otherwise?= From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 14:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Cc: 51832@debbugs.gnu.org, Alan Third , Eli Zaretskii , tor.a.s.kringeland@ntnu.no Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163690009427865 (code B ref 51832); Sun, 14 Nov 2021 14:29:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 14:28:14 +0000 Received: from localhost ([127.0.0.1]:49562 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGUQ-0007FN-5E for submit@debbugs.gnu.org; Sun, 14 Nov 2021 09:28:14 -0500 Received: from quimby.gnus.org ([95.216.78.240]:32896) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmGUO-0007F7-OS for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 09:28:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=XMBGVzi/fM3VlnFVaTwf2YfTXeXeJ/hCyDssqFPuLI8=; b=Dc32EZN/qs+vEZn7yN9RmbDe0W 3u6TwShGoZIfKTVsScQXS+J0kLbNmWCjN+r/7k8qP3u2yiOgXX5A9ORf66X5eW/W+BQhCR/TALZee jpVNAg8mZWIG3hjo4cyRVpl//2YZTVYGVGYU3vSXf7GR3Cd1V9v3+8AwNnkglmva6kOU=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmGUF-0004Rt-0y; Sun, 14 Nov 2021 15:28:05 +0100 From: Lars Ingebrigtsen References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87v90u7t2l.fsf@gnus.org> <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> X-Now-Playing: Caroline Shaw & =?UTF-8?Q?S=C5=8D?= Percussion's _Let The Soil Play Its Simple Part_: "Some Bright Morning" Date: Sun, 14 Nov 2021 15:28:02 +0100 In-Reply-To: <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> (Philipp's message of "Sun, 14 Nov 2021 15:23:03 +0100") Message-ID: <87pmr27qx9.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philipp writes: >> That didn't fix the issue for me, I'm afraid -- with that patch, LANG is >> still the invalid en_NO.UTF-8 for me. > > Maybe we should add similar logic as iTerm2 > (https://github.com/gnachman/iTer [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Philipp writes: >> That didn't fix the issue for me, I'm afraid -- with that patch, LANG is >> still the invalid en_NO.UTF-8 for me. > > Maybe we should add similar logic as iTerm2 > (https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f27541740bf6/sources/PTYSession.m#L7107): > create the locale identifier from language code and country code > instead of the current locale identifier, I think that's what's Macos is returning -- it's just concatenating those two codes to get a locale identifier. (Which is wrong, of course.) > and use setlocale (or better, newlocale) to check whether it's valid, Yes, that sounds good. > and fall back to en_US.UTF-8 otherwise? Hm... I'd rather just leave LANG unset in that case -- it'll probably lead to fewer glitches, I think. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Daniel =?UTF-8?Q?Mart=C3=ADn?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 15:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Philipp Cc: Lars Ingebrigtsen , 51832@debbugs.gnu.org, tor.a.s.kringeland@ntnu.no, Alan Third Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.16369020939010 (code B ref 51832); Sun, 14 Nov 2021 15:02:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 15:01:33 +0000 Received: from localhost ([127.0.0.1]:51322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmH0f-0002LG-E6 for submit@debbugs.gnu.org; Sun, 14 Nov 2021 10:01:33 -0500 Received: from sonic306-20.consmr.mail.ir2.yahoo.com ([77.238.176.206]:42423) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmH0b-0002Kt-6S for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 10:01:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.es; s=s2048; t=1636902081; bh=HDlML7KjsgkLZBI8nWO1H/Brvzp9Rd8xbfgS8Iu8VAY=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=FecGctF6hrCAsrejiu9+2ro9YiliTwI5xOFKLnsA2fsgTIBoI06Qh54qbbxUfLzY4TjWBy+8jhVqdl2D1mmXlG+OiszVqUSR4NYhkzS2RwRu5LZ7Yv5xe+W7UaOfTzOlIwJjwdc0vVTTsMScnCh6o7mJQ5Pqzhp+G7USjuJFHtaDuVm7V5vmqKPqpD17BntM0YJD1ym8dSA/eBDbfGdeLm07ATMoQVZK7sONVmFcdnRvJ2cZGzo0SA+/5HnPxZrb4B5LcQJXvwoyFNBmUTN3ceZffnTtLtDWFtdfh2aRjVjzc35XzySfgDEIZTAWCCf9BQvTMrV4hBZVk3eDvlCAmQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1636902081; bh=qAcnxGvJ2/vY40pLTO0baElt0MKDQO1cDtUAYUq6Y1k=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=Srz/nzjpLBVZpV2roFmqyazlwcW33ty4MhCDdbMaPomcxi/OuFiHE2jB43lp3Ouq+aqklpkeoKxjmJHaiy5EXUQvjLkRiabWn0HM1S7RxZcRX5dRxvAfqQysXjHL6zJ+SA+KWrvmY88XuYZU+VYQnBVsnR8xVFaDJOA+daUGwzoM/1MQZbQBX6HW6jYtTo7rhZD4c7EZtaNDzLZpVbYw6+cfClXwFyazn+4NhGFLx3bnRfkR3Dd0WX80+rRfTDWUTQ72rkQMJlz5jYEZ+i5MV3Qvtobe9WrScBOUSSZ66P4ljS9BaVoT2jYT0wxcbvaHjWv0UShPPJ1GaYH5kGqOLQ== X-YMail-OSG: PkUtj2MVM1nfUU1cJtCoIIoWDSOhGozHi05Y1Cd.cxkUu.TNV7E__1OVcHGVJuN rxZwXtYRtatUp.MCPkrGM0xSLWSEyf2OhtsZaSqr3v.w5a92vt6AjJP30NjDoP.yyKDbOSP8W6mv Kx.afvgv4eb6BUIKorT54GnIwMG4K4CHO3P06u4wv0HCxN8qBjF4rVf7yXe86D9G2iWqMmkdb4oS Xs1MMkaenM23UlJDr7FoIhTBGbwQsiDq.R5RQzK9SK7Z09MFHivETdRpflfcg6xjdXQ094LXIV7B 5zjayZ0JoenngpC5JHWIF_yKj1eML2d_Ng83Ywk1SGR7Ih4ojwMwGqw9DqOh4eTEo6ARiGxOu68l ocJPvaCQqOCXaE83WYJHxGz0s4TiRkOVXznCAv5wzvyP5Ou.NBVEj64t5.k19GEDT_coNeNhFu_M bcq4Z_.STzkcBVdbQY3TQ9549gXqRuKSRt615udEfGC9mSRx2k7oCvsFg2FXPJqeaUjQ8CY22W5J p9WpIU_5XuyI2krWTvtTLpIOSONvaJ6IyV_TZlyPfF1bSWBgleJCANT8CZSG1.7HjcNxtEiPdary 5INGOTDrOLIzS6.A.gHDJY9ePLK_wA3wSqP1rDYm9pZaiPuIX01iwcXydKVDFe5o.pJlXtQT8u.c Jtaduy4z6cvWgISEgOHJX0GOm50611ffbcOUuG.Ou3Sy6j6CdlrA4Yw8ON7EZVrxQnR_k5AGjjZ6 h4F3yyQLw0uz_78VpPfPPj0FxXhN.o30rXBnrhu0MVROWkwTGKxoyX4Y3meb5iZWUIrKTCHH5rwp xsdDU5vH9tFN238AhAdLt1BqwCDOOVz_QNApMObavO01iUc0pGEum4Bws6wJKyfKhIh0PcpznG2T BT7ztpTxjkm4qK9Jm2pctRMS7aUe7J1aCYgUf_53m6jsn5wsej304wrLE545XTk5625uyUcPU6lV RApwEiTYSp9SpO6a29X3FwNIJl2FtGkK0V5Po7cdX2Ls4LfUnyQSKS5u018aw8Qz8jRx1.QPZ5pf Xo5PAlbyFjdbb.9QZfx.cVDpSHuctKIR1lcESwsE5lUZDdUmYACHzxOkNrHX5ge9JEXBrA1ujZ9U HGvSyS0djY45u2GTVcUtpYB6OTWAC0YQu0W6PoAUuTSNk2O7qtqq.xuXN.hADwP79yLR19qKoUXV MfNb.YZNvi4lKlReji4Z6k2v4pyfkCxALspbh0zK0QklcycRWWf22AV_gX.LPsjJzF1HeMzCPgco bDwUgnQciwAf874UXwrMwRqDk23hesS8NyS7pauSipp5yp_8SRieJhxYI2pTY_Ag9ATUl.SIVGao 0QRUph0NO6syfEGsHoQdpzW4cgvSv0Rtweaz9AkX46CcdXoUtW4Z_5TMwIipmKJ3X4ZnWtlpDL7b E6vWap69aNP_H6rVFKKOvVPrKm0GX28Go_FBjv4KoOUy61nYctNeR821eEW8693ToXWM.KluAgiO CgK9rN.8oRHVlVd8c2Lu5u97cSYG5iMduVi83V922WwXIuNg6Sl2W2GVr_aS_iEABHDsIxYPCDWM FnnCl2up8KBOjRDFAZ1GxB7DA.yfb9O47_0iaG5wcrxP9FFNtCBOyWbQJzzV3ecspS33HrGUAb30 Z2QDrw9DC0f5lFwXm0qHP6ET2C_VT77r8Tu3ld2Pyinz1gRlPO5stNHnS5SwBg7PUF7ig8mtEBRK b.P23_v2xLY261P4mQ4yxmhUVDY9ugLWoES7ThRfEDwBH2MANzHjya3vB9AQ1qllfTuwoabEl2hQ 3BNjvKfKYRnMAxsR_n__tv.WQCi5KPKgziJDhKPQNKgvQO9SlINtXoAl.aZZJdcZ6QstoeKiyy27 AKuI5apK9t_zSxa4rPcSSsv91tV.ZEOiTTZl5gG9.M7w0V8VA8TJzXP0kp.G2yTTRxiLscV9plDe rL5pF6FqweH7odxsb3Wq_ZIWgGzEJroYNBaI9h03sGiEYIZ_pfMMlUjXkqg_JwFcWNuZ.PflVkAi JzbV7EfIbIGxTxkDceCXiy7A2DEZN55_zyQ6cWsIonX9Eif4g0741L7vWNTFkNw2c5ymuJFVs_g8 U3gaQtKKnmlvbzEBs8by7ABD.KL1x.XMDP36VeH4N_4uP_05GnylsDdt..K5Hty3qysFqNV3SNlk .Oev5sdjFEO.820MdoniaULtEeJaAKF.Y8Lmd3DTEaXsWV6dQ7dJPBvVJla7PQIInXgVSYavGOkV SxME- X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.ir2.yahoo.com with HTTP; Sun, 14 Nov 2021 15:01:21 +0000 Received: by kubenode519.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 9682ac9765ec018f490c7379ac82e85a; Sun, 14 Nov 2021 15:01:19 +0000 (UTC) From: Daniel =?UTF-8?Q?Mart=C3=ADn?= References: <834k8fw62v.fsf@gnu.org> <87y25r8968.fsf@gnus.org> <83mtm7upc4.fsf@gnu.org> <87tugf881r.fsf@gnus.org> <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87v90u7t2l.fsf@gnus.org> <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> Date: Sun, 14 Nov 2021 16:01:17 +0100 In-Reply-To: <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> (Philipp's message of "Sun, 14 Nov 2021 15:23:03 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Mailer: WebService/1.1.19306 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Content-Length: 1387 X-Spam-Score: 0.2 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) Philipp writes: >> Am 14.11.2021 um 14:41 schrieb Lars Ingebrigtsen : >> >> Alan Third writes: >> >>> I've attached a patch that may do something towards preventing this >>> problem but ultimately this is a convenience to give a best guess at >>> choosing the correct dictionary, date format, etc. If we can't easily >>> fix it then we can drop it and tell people to set it in their init.el >>> themselves. >> >> That didn't fix the issue for me, I'm afraid -- with that patch, LANG is >> still the invalid en_NO.UTF-8 for me. > > Maybe we should add similar logic as iTerm2 > (https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f27541740bf6/sources/PTYSession.m#L7107): > create the locale identifier from language code and country code > instead of the current locale identifier, and use setlocale (or > better, newlocale) to check whether it's valid, and fall back to > en_US.UTF-8 otherwise? Native macOS Terminal also has similar logic that calls setlocale. It tries to setlocale on LC_ALL (first argument 0) with these locale identifiers in turn, until one of them succeeds: - "localeIdentifier.UTF-8" - "languageCode_countryCode.UTF-8" - "languageCode_countryCode" So they seem to give preference to [[NSLocale currentLocale] localeIdentifier] and only use "languageCode_countryCode" as fallback. From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 15:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 51832@debbugs.gnu.org, Philipp , Eli Zaretskii , tor.a.s.kringeland@ntnu.no Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163690322910836 (code B ref 51832); Sun, 14 Nov 2021 15:21:02 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 15:20:29 +0000 Received: from localhost ([127.0.0.1]:51347 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmHIz-0002oi-24 for submit@debbugs.gnu.org; Sun, 14 Nov 2021 10:20:29 -0500 Received: from outbound.soverin.net ([116.202.126.228]:45317) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmHIx-0002oS-4N for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 10:20:27 -0500 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id 3AD118A1; Sun, 14 Nov 2021 15:20:21 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1636903219; bh=mdaSFkki3HU5ZNM8dEfil0lZd2KFzEt+315zWWe9wrI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bsxatHsfQJGaL/9fUdiJFvGATZ4No6whfLOO7B3xfB2sSVSpDNkffDm/jwb4VbNPY e1Qvd8htzFvSyAoEQYkJzthn+Y0z24pFgFVKpWk1eJhH81NDccEqAMfB42scNfe3jw ri9wyYntDzwI3a7Z1qWl54jHCeBIy/uWGD2YJHZILRhLl2fMxJYUI4+1/OYiTnb279 sZYUaYWNzx6p1br/zpXGBbFdzQ6JMzN9ImwwPZJ0400P9orLTeZHtk20bOm4/UxHXn hJvqaDR5uIQ0aUOL7r8UwL+r0gqgRLnyy1Pi3Fuxy5bQr24cv65s/Thv2sO6gvjPpI qkUBVf+hJwGaA== Received: by breton.holly.idiocy.org (Postfix, from userid 501) id B81A5202DAFC61; Sun, 14 Nov 2021 15:20:14 +0000 (GMT) Date: Sun, 14 Nov 2021 15:20:14 +0000 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Lars Ingebrigtsen , Philipp , Eli Zaretskii , tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org References: <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87v90u7t2l.fsf@gnus.org> <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> <87pmr27qx9.fsf@gnus.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="gGwfOvpY0P3Vgaxz" Content-Disposition: inline In-Reply-To: <87pmr27qx9.fsf@gnus.org> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) --gGwfOvpY0P3Vgaxz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Nov 14, 2021 at 03:28:02PM +0100, Lars Ingebrigtsen wrote: > Philipp writes: > > >> That didn't fix the issue for me, I'm afraid -- with that patch, LANG is > >> still the invalid en_NO.UTF-8 for me. > > > > Maybe we should add similar logic as iTerm2 I tried to find how iTerm2 does it. Your search-fu is better than mine, apparently. :) > > (https://github.com/gnachman/iTerm2/blob/79aff4d59fd591e7628649bcabe5f27541740bf6/sources/PTYSession.m#L7107): > > create the locale identifier from language code and country code > > instead of the current locale identifier, > > I think that's what's Macos is returning -- it's just concatenating > those two codes to get a locale identifier. (Which is wrong, of > course.) Yeah, I don't think there's any advantage to building them up manually. > > and use setlocale (or better, newlocale) to check whether it's valid, > > Yes, that sounds good. > > > and fall back to en_US.UTF-8 otherwise? > > Hm... I'd rather just leave LANG unset in that case -- it'll probably > lead to fewer glitches, I think. I proposed something similar before: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51321#90 but it didn't look like we needed it then. We know better now. New patch attached. -- Alan Third --gGwfOvpY0P3Vgaxz Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="v2-0001-Only-set-LANG-if-the-ID-is-valid.patch" >From 3a2e20c659d8732b11d30cdb27e36610e87a0315 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 14 Nov 2021 15:09:43 +0000 Subject: [PATCH v2] Only set LANG if the ID is valid * src/nsterm.m (ns_init_locale): Check the provided locale identifier is available before trying to use it. --- src/nsterm.m | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 1f17a30272..983e5eb8ac 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -535,21 +535,18 @@ - (NSColor *)colorUsingDefaultColorSpace NSTRACE ("ns_init_locale"); - @try + if (!isatty (STDIN_FILENO)) { - /* It seems macOS should probably use UTF-8 everywhere. - 'localeIdentifier' does not specify the encoding, and I can't - find any way to get the OS to tell us which encoding to use, - so hard-code '.UTF-8'. */ + char *oldLocale = setlocale (LC_ALL, NULL); NSString *localeID = [NSString stringWithFormat:@"%@.UTF-8", [locale localeIdentifier]]; - /* Set LANG to locale, but not if LANG is already set. */ - setenv("LANG", [localeID UTF8String], 0); - } - @catch (NSException *e) - { - NSLog (@"Locale detection failed: %@: %@", [e name], [e reason]); + /* Check the locale ID is valid and if so set LANG, but not if + it is already set. */ + if (setlocale (LC_ALL, [localeID UTF8String])) + setenv("LANG", [localeID UTF8String], 0); + + setlocale (LC_ALL, oldLocale); } } -- 2.32.0 --gGwfOvpY0P3Vgaxz-- From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Nov 2021 15:30:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third Cc: 51832@debbugs.gnu.org, Philipp , Eli Zaretskii , tor.a.s.kringeland@ntnu.no Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163690376711730 (code B ref 51832); Sun, 14 Nov 2021 15:30:01 +0000 Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 15:29:27 +0000 Received: from localhost ([127.0.0.1]:51360 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmHRf-000338-JM for submit@debbugs.gnu.org; Sun, 14 Nov 2021 10:29:27 -0500 Received: from quimby.gnus.org ([95.216.78.240]:33418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmHRc-00032g-3b for 51832@debbugs.gnu.org; Sun, 14 Nov 2021 10:29:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Zsmp+Hxx+kaFLGKsTq8+EQ0H01eVKIiyDKlgotnWjVU=; b=H7qtqnaxn5+OHzmaUqBb3dpDRQ WI4q7PXRxB7+lzM8gRolOYqjC7w9MoRzgYBqrygfL/G3Ub6coc8hm8VE8AYlLl2AVcbwHix6wqVaQ kp+l1vyw04jrvJDbHK6dTXb+5YVxdYndqQPT+KGjm9ptGpxAL1zTTUg9HC3SePaGpSp0=; Received: from [84.212.220.105] (helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmHRS-0004pP-9N; Sun, 14 Nov 2021 16:29:16 +0100 From: Lars Ingebrigtsen References: <83k0hbuosm.fsf@gnu.org> <87h7cf84l1.fsf@gnus.org> <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87v90u7t2l.fsf@gnus.org> <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> <87pmr27qx9.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEXjt9O6bZgnLq2X TGZEJTf////hBHywAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+ULDg8cGOMV5IUAAAG7SURBVDjLdZLr dcMgDIXB7gDIMEBLO0BUaYA4Yv+ZqgdxfNKEH20On++VdEVKz6fklPtnT/9P1vscoMRFSgDF/6fk gBCgUqVB0hDiIwOr0NDDIjxoR1Ns/QzYgODDapU2QsKjXq2GCgxk+e2hGMJa/aQA4jHsekgNqxyK ak4iWBVYv31a2fdGBjm4W5UVml4G2FkVsFgkOa1qMdSeSIEoWLzGBKagqnwG5l0hu9Eg+8ADgbJp gJliQAUsLblViq5aNGVzgCacS8yRToAyYUmHwmuI1RDwrvrndiouqtxtHUvvX6b4QD7aBYxuNwcy YnLS5N1qZvUxk0JilcT+FwczRMIKDJdHug3nBgmAy+VhtdIdYMZ8jdqPrHQ8fUXf+RoPa/N2XaGZ V6C13BVYayj05UAdvloA6Ek9ArAUaMzgVhqiXlA8uIGlNTmsbGI2CWlxapGtpWtXJP5XuyVUg8sB wCYxkL2Rq81uYOAcvGpDwwEE2CMqBTXrr5vuY5tASGgHCLDfawxfiCIoPBWzRixkpxoP5gmohGMx N518O4Hj3Ervr8GT1QnAG1CWvpzBntvPayvRuwP0N+ct+AOuNaunVkLiqAAAACV0RVh0ZGF0ZTpj cmVhdGUAMjAyMS0xMS0xNFQxNToyODoyNCswMDowMIdXttYAAAAldEVYdGRhdGU6bW9kaWZ5ADIw MjEtMTEtMTRUMTU6Mjg6MjQrMDA6MDD2Cg5qAAAAAElFTkSuQmCC X-Now-Playing: Snapped Ankles's _Forest of Your Problems_: "The Prince Is Back" Date: Sun, 14 Nov 2021 16:29:09 +0100 In-Reply-To: (Alan Third's message of "Sun, 14 Nov 2021 15:20:14 +0000") Message-ID: <877dda7o3e.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Third writes: > New patch attached. Yup; that fixes the issue here -- LANG is unset in Emacs, and I can now pipe in non-ASCII into pbcopy successfully. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Third writes: > New patch attached. Yup; that fixes the issue here -- LANG is unset in Emacs, and I can now pipe in non-ASCII into pbcopy successfully. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Alan Third Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 16 Nov 2021 20:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Lars Ingebrigtsen Cc: 51832@debbugs.gnu.org, Philipp , Eli Zaretskii , tor.a.s.kringeland@ntnu.no Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.163709597820176 (code B ref 51832); Tue, 16 Nov 2021 20:53:01 +0000 Received: (at 51832) by debbugs.gnu.org; 16 Nov 2021 20:52:58 +0000 Received: from localhost ([127.0.0.1]:59330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mn5Rq-0005FL-Ax for submit@debbugs.gnu.org; Tue, 16 Nov 2021 15:52:58 -0500 Received: from outbound.soverin.net ([116.202.126.228]:37885) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mn5Rn-0005Ey-Ux for 51832@debbugs.gnu.org; Tue, 16 Nov 2021 15:52:56 -0500 Received: from smtp.soverin.net (unknown [10.10.3.24]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by outbound.soverin.net (Postfix) with ESMTPS id BBFD41E2; Tue, 16 Nov 2021 20:52:49 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [159.69.232.138]) by soverin.net DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=idiocy.org; s=soverin; t=1637095968; bh=QXdp4eA0yFplPKXGd2U0V6QPv077LkT7oM9il7poOo0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lOo3RKzIdrtXkG8MP1J3feME4Be0sq/7kLGTDoC/bjsXdVfoUpF1eduUpC4+6V8Ja o6TWQ3V9np3973G2opOVsCL4+aZMwbmaffhtcLtCFzJVC0mGU1y6NzsOvJ344B9Orq L1cYDHCwI1mgNXWoOLmGWTHKK/e1S6YE8LW3hYiXblInnq74eIRDeyiG7Ulvz8mGAa 0oSNykx64Flu/P5rDQd28V/0sWwud3U6CFtwT46Miw5hI9fLaDf3nsSEDFLnB2FTJe 7pcJpPtjCTEl5jjudzEFgKMdaGlVelXxbjMNttQCbLJKAiBYUzxSqfN/yVghln4NGs bvOX9Aam4u1Bw== Received: from alan by faroe.holly.idiocy.org with local (Exim 4.95-RC2) (envelope-from ) id 1mn5Re-000PpX-5p; Tue, 16 Nov 2021 20:52:46 +0000 Date: Tue, 16 Nov 2021 20:52:46 +0000 From: Alan Third Message-ID: Mail-Followup-To: Alan Third , Lars Ingebrigtsen , Philipp , Eli Zaretskii , tor.a.s.kringeland@ntnu.no, 51832@debbugs.gnu.org References: <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87v90u7t2l.fsf@gnus.org> <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> <87pmr27qx9.fsf@gnus.org> <877dda7o3e.fsf@gnus.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <877dda7o3e.fsf@gnus.org> X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Sun, Nov 14, 2021 at 04:29:09PM +0100, Lars Ingebrigtsen wrote: > Alan Third writes: > > > New patch attached. > > Yup; that fixes the issue here -- LANG is unset in Emacs, and I can now > pipe in non-ASCII into pbcopy successfully. Thanks. I've pushed to master. -- Alan Third From unknown Mon Jun 23 23:51:14 2025 X-Loop: help-debbugs@gnu.org Subject: bug#51832: Piping unicode text in `shell-command' Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 20 Sep 2022 13:25:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51832 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Alan Third Cc: 51832@debbugs.gnu.org, Eli Zaretskii , Philipp , tor.a.s.kringeland@ntnu.no Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.166368028923248 (code B ref 51832); Tue, 20 Sep 2022 13:25:01 +0000 Received: (at 51832) by debbugs.gnu.org; 20 Sep 2022 13:24:49 +0000 Received: from localhost ([127.0.0.1]:56607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oadF3-00062u-Iq for submit@debbugs.gnu.org; Tue, 20 Sep 2022 09:24:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46364) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oadF0-00062U-Uf for 51832@debbugs.gnu.org; Tue, 20 Sep 2022 09:24:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:Date:References: In-Reply-To:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=OigqWB8jxNZaoygBGCLDDAEiN+cS7L+Dlen/AU6gKpU=; b=UzWq9pA1If+DbfBp+Nn1R3Tc1m Q9llRd1V6TEBVf6M0EnaRyqAHe+pjqq3LdDV05i9O5oeZRYte9ZWH0AApL/6XjgI2RIOEP4/C64Vh OGDxOE8erchhZ9D7D9oxnZiwEKXBPciyTPoqgBOSD+I8/W13souLPpU5/ONcxr59LhaY=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oadEm-0002Ml-Us; Tue, 20 Sep 2022 15:24:35 +0200 From: Lars Ingebrigtsen In-Reply-To: (Alan Third's message of "Tue, 16 Nov 2021 20:52:46 +0000") References: <87czn383z6.fsf@gnus.org> <83h7cfuixu.fsf@gnu.org> <9EB4417D-2457-46AD-9198-E42BBAF11071@gmail.com> <83czn3uhtd.fsf@gnu.org> <87v90u7t2l.fsf@gnus.org> <44FDC8DA-6F3B-4896-B019-D98A9E7D72E7@gmail.com> <87pmr27qx9.fsf@gnus.org> <877dda7o3e.fsf@gnus.org> X-Now-Playing: Alasdair Roberts og =?UTF-8?Q?V=C3=B6lvur's?= _The Old Fabled River_: "Orison of Unison" Date: Tue, 20 Sep 2022 15:24:32 +0200 Message-ID: <87o7vafab3.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Alan Third writes: >> Yup; that fixes the issue here -- LANG is unset in Emacs, and I can now >> pipe in non-ASCII into pbcopy successfully. > > Thanks. I've pushed to master. The bug report was left open, so I'm closing it now. (I only lightly skimmed this long bug report thread -- if there were other issues here that need fixing, please respond to the debbugs address, and [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Alan Third writes: >> Yup; that fixes the issue here -- LANG is unset in Emacs, and I can now >> pipe in non-ASCII into pbcopy successfully. > > Thanks. I've pushed to master. The bug report was left open, so I'm closing it now. (I only lightly skimmed this long bug report thread -- if there were other issues here that need fixing, please respond to the debbugs address, and we'll reopen. Or even better -- open a new bug report.) From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 20 09:24:46 2022 Received: (at control) by debbugs.gnu.org; 20 Sep 2022 13:24:46 +0000 Received: from localhost ([127.0.0.1]:56604 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oadF0-00062f-BI for submit@debbugs.gnu.org; Tue, 20 Sep 2022 09:24:46 -0400 Received: from quimby.gnus.org ([95.216.78.240]:46360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oadEy-00062Q-Oe for control@debbugs.gnu.org; Tue, 20 Sep 2022 09:24:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ycABK+pvp7qqZ6/xGGxDUPUixyCwSYUdzPWG4C9enGc=; b=kVq5bzfuw1hz3sA5sVYe6rhmRK Z+tsdMm2TMUk7swj3Gydai1/ExAOy3i80tWZxcVfvlojvOkGc2QD/s73k/oaHFIp+VhRnD37mMe7F Jjm5qxHAjXr3SPTLJhbjPal838cViQtIV4b1e+sElExc0b2aPEYjb14Fgw4Dk0xbNHyw=; Received: from [84.212.220.105] (helo=joga) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oadEr-0002Mq-3O for control@debbugs.gnu.org; Tue, 20 Sep 2022 15:24:39 +0200 Date: Tue, 20 Sep 2022 15:24:36 +0200 Message-Id: <87mtaufaaz.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #51832 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 51832 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) close 51832 quit