From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29295 invoked by alias); 3 Jan 2012 15:32:49 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 30079 Received: (qmail 24970 invoked from network); 3 Jan 2012 15:32:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: 654225@bugs.debian.org Cc: Michael Prokop , mbj@spamcop.net, zsh-workers@zsh.org Subject: PATCH: Restore `LC_ALL' when setting `LANG' In-Reply-To: <87boqk95we.fsf@ft.bewatermyfriend.org> (Frank Terbeck's message of "Tue, 03 Jan 2012 16:12:33 +0100") References: <20120102132718.GA12143@gatsby.mbjnet.dk> <87fwfyb2if.fsf@ft.bewatermyfriend.org> <20120102154714.GA20663@gatsby.mbjnet.dk> <87wr9a9ely.fsf@ft.bewatermyfriend.org> <20120103111049.GA5673@gatsby.mbjnet.dk> <87sjjw98yl.fsf@ft.bewatermyfriend.org> <87k458974e.fsf@ft.bewatermyfriend.org> <2012-01-03T15-59-18@devnull.michael-prokop.at> <87boqk95we.fsf@ft.bewatermyfriend.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) Date: Tue, 03 Jan 2012 16:26:44 +0100 Message-ID: <87y5to7qob.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: NDMwNDQ0 (Cc:ing Upstream) When setting LANG, zsh sets LC_ALL and then goes on to restore all interesting LC_* values after that. Up to now, it did not restore LC_ALL itself, though. That could lead to trouble when setting LC_ALL=something-utf8-ish and after that LANG=something-non-utf8. This was reported in Debian bugreport #654225: A recipe to reproduce the issue is here: I think the patch below fixes the issue correctly, by restoring LC_ALL from its parameter along the way with all the other LC_* values zsh cares about. (FWIW, the test-suite still passes with this change.) Regards, Frank --- Src/params.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/Src/params.c b/Src/params.c index 446cccc..6d98b8e 100644 --- a/Src/params.c +++ b/Src/params.c @@ -3780,6 +3780,9 @@ static struct localename { #ifdef LC_TIME {"LC_TIME", LC_TIME}, #endif +#ifdef LC_ALL + {"LC_ALL", LC_ALL}, +#endif {NULL, 0} }; -- 1.7.8.rc3.17.gf56ef1