Author: jra
Date: 2004-12-10 05:49:48 +0000 (Fri, 10 Dec 2004)
New Revision: 4126

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4126

Log:
Fix from Bj?\195?\182rn Jacke <[EMAIL PROTECTED]> for bugid #2040 - ensure the 
locale 
is reset to C to get ASCII-compatible toupper/lower functions.
Jeremy.

Modified:
   branches/SAMBA_3_0/source/lib/charcnv.c


Changeset:
Modified: branches/SAMBA_3_0/source/lib/charcnv.c
===================================================================
--- branches/SAMBA_3_0/source/lib/charcnv.c     2004-12-10 05:49:44 UTC (rev 
4125)
+++ branches/SAMBA_3_0/source/lib/charcnv.c     2004-12-10 05:49:48 UTC (rev 
4126)
@@ -84,6 +84,15 @@
                }
                ret = ln;
        }
+#ifdef HAVE_SETLOCALE
+       /* We set back the locale to C to get ASCII-compatible toupper/lower 
functions.
+          For now we do not need any other POSIX localisations anyway. When we 
should
+          really need localized string functions one day we need to write our 
own
+          ascii_tolower etc.
+       */
+       setlocale(LC_ALL, "C");
+ #endif
+
 #endif
 
        if (!ret || !*ret) ret = "ASCII";

Reply via email to