From 150ccd630565848ad196c77b5ed18d50fc937e2e Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 18 Aug 2023 18:54:32 +0200 Subject: [PATCH] fix(cli): set LC_ALL to force english output Close: #7331 Co-authored-by: xz-dev --- bin/doom | 1 + bin/doomscript | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/bin/doom b/bin/doom index f9d1841e6..deafdf662 100755 --- a/bin/doom +++ b/bin/doom @@ -1,5 +1,6 @@ #!/usr/bin/env sh :; # -*- mode: emacs-lisp; lexical-binding: t -*- +:; export LC_ALL=C.UTF-8 :; case "$EMACS" in *term*) EMACS=emacs ;; *) EMACS="${EMACS:-emacs}" ;; esac :; emacs="$EMACS ${DEBUG:+--debug-init} -q --no-site-file --batch" :; tmpdir=`$emacs --eval '(princ (temporary-file-directory))' 2>/dev/null` diff --git a/bin/doomscript b/bin/doomscript index c5f487335..fdb01edc3 100755 --- a/bin/doomscript +++ b/bin/doomscript @@ -1,4 +1,5 @@ #!/usr/bin/env sh +# -*- coding: utf-8-unix -*- # This is a shebang interpreter for launching Emacs Lisp scripts with Doom's CLI # framework preloaded, plus any environment variables it needs. Use it like so: # @@ -19,6 +20,9 @@ if [ "$#" -eq 0 ]; then exit 1 fi +# Prevent garbled non-English output from child processes +export LC_ALL=C.UTF-8 + case "$EMACS" in *term*) EMACS=emacs ;; # in {ansi-,v}term *) EMACS="${EMACS:-emacs}" ;;