GNU bug report logs - #51832
Piping unicode text in `shell-command'

Previous Next

Package: emacs;

Reported by: Tor Kringeland <tor.a.s.kringeland <at> ntnu.no>

Date: Sun, 14 Nov 2021 07:06:02 UTC

Severity: normal

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tor.a.s.kringeland <at> ntnu.no, 51832 <at> debbugs.gnu.org, alan <at> idiocy.org
Subject: bug#51832: Piping unicode text in `shell-command'
Date: Sun, 14 Nov 2021 10:19:13 +0100
Eli Zaretskii <eliz <at> gnu.org> 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😀bar | 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. 

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 2 years and 248 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.