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

Re: PATCH: Restore `LC_ALL' when setting `LANG'



Instead of adding LC_ALL to lc_names[], I think it better
not calling setlocale() at all if LC_ALL is non-empty.

Index: Src/params.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/params.c,v
retrieving revision 1.175
diff -u -r1.175 params.c
--- Src/params.c	11 Aug 2011 19:32:50 -0000	1.175
+++ Src/params.c	6 Jan 2012 05:42:12 -0000
@@ -3788,6 +3788,10 @@
 setlang(char *x)
 {
     struct localename *ln;
+    char *x2;
+
+    if ((x2 = getsparam("LC_ALL")) && *x2)
+	return;
 
     /*
      * Set the global locale to the value passed, but override



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