Subject: Re: bug#51832: Piping unicode text in `shell-command'

From: Eli Zaretskii <[email-masked]>
Date: Sun, 14 Nov 2021 09:26:48 +0200

> From: Tor Kringeland <[email-masked]>
> 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?