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

From: Philipp <[email-masked]>
Date: Sun, 14 Nov 2021 12:48:21 +0100

> Am 14.11.2021 um 12:20 schrieb Lars Ingebrigtsen <[email-masked]>:
> 
> Eli Zaretskii <[email-masked]> 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.

For reference, on my Monterey system, only the following variables are initially set when launching Emacs from Finder:

__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3
__CFBundleIdentifier=org.gnu.Emacs
COMMAND_MODE=unix2003
DISPLAY=/private/tmp/com.apple.launchd.[...]/org.macosforge.xquartz:0
HOME=/Users/p
LOGNAME=p
PATH=/usr/bin:/bin:/usr/sbin:/sbin
SHELL=/opt/homebrew/bin/bash
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.[...]/Listeners
TMPDIR=/var/folders/hw/[...]/T/
USER=p
XPC_FLAGS=0x0
XPC_SERVICE_NAME=application.org.gnu.Emacs.[...]