From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#51832: Piping unicode text in `shell-command' Date: Sun, 14 Nov 2021 08:53:51 +0100 Message-ID: <87y25r8968.fsf@gnus.org> References: <834k8fw62v.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="13194"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: Tor Kringeland , 51832@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 14 08:55:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mmAM4-0003Gd-KW for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Nov 2021 08:55:12 +0100 Original-Received: from localhost ([::1]:53698 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmAM3-0000Dk-NM for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Nov 2021 02:55:11 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:55036) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmALu-00008j-BQ for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 02:55:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37503) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmALu-0008Hr-2t for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 02:55:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmALt-0000e5-V5 for bug-gnu-emacs@gnu.org; Sun, 14 Nov 2021 02:55:01 -0500 X-Loop: help-debbugs@gnu.org 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 Original-Received: via spool by 51832-submit@debbugs.gnu.org id=B51832.16368764452404 (code B ref 51832); Sun, 14 Nov 2021 07:55:01 +0000 Original-Received: (at 51832) by debbugs.gnu.org; 14 Nov 2021 07:54:05 +0000 Original-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 Original-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=; Original-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 X-Now-Playing: Schneider TM's _The 8 Of Space_: "Oh Life" In-Reply-To: <834k8fw62v.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 14 Nov 2021 09:26:48 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:219909 Archived-At: 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