Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Restore `LC_ALL' when setting `LANG'

(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},
+#ifdef LC_ALL
+    {"LC_ALL", LC_ALL},
     {NULL, 0}

Messages sorted by: Reverse Date, Date, Thread, Author