quilt-dev
[Top][All Lists]
Advanced

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

Re: [Quilt-dev] [PATCH] Call pager with original LANG environment variab


From: Jean Delvare
Subject: Re: [Quilt-dev] [PATCH] Call pager with original LANG environment variable
Date: Mon, 23 Mar 2020 14:32:26 +0100

On Fri, 2020-02-28 at 22:02 +0100, Urs Thuermann wrote:
> 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"
>  

Applied, thanks.

-- 
Jean Delvare
SUSE L3 Support



reply via email to

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