quilt-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Quilt-dev] [PATCH] Call pager with original LANG environment variable


From: Urs Thuermann
Subject: [Quilt-dev] [PATCH] Call pager with original LANG environment variable
Date: 28 Feb 2020 22:02:28 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Author: Urs Thuermann <address@hidden>
Date:   Tue Feb 11 06:43:05 2020 +0100

Call pager with original LANG environment variable

The first few lines in quilt/scripts/patchfns set the LANG environment
variable to POSIX saving the previous value in ORIGINAL_LANG.  This is
used to restore the original locale when calling a user-specified diff
command but not for the pager.  Without this patch the pager is called
with LANG=POSIX causing non-ASCII characters to be printed wrong
unless LC_CTYPE is also set in the environment.

This patch restores LANG for the pager to its original value.

diff --git a/quilt/scripts/patchfns.in b/quilt/scripts/patchfns.in
index 15ffa98..2029d62 100644
--- a/quilt/scripts/patchfns.in
+++ b/quilt/scripts/patchfns.in
@@ -1105,7 +1105,7 @@ setup_pager()
        pager_fifo_dir="$(gen_tempfile -d)"
        pager_fifo="$pager_fifo_dir/0"
        mkfifo -m 600 "$pager_fifo"
-       $QUILT_PAGER < "$pager_fifo" &
+       LANG=$ORIGINAL_LANG $QUILT_PAGER < "$pager_fifo" &
        pager_pid=$!
        exec > "$pager_fifo"
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]