svn commit: samba r4125 - in trunk/source/lib: .
jra at samba.org
jra at samba.org
Fri Dec 10 05:49:45 GMT 2004
Author: jra
Date: 2004-12-10 05:49:44 +0000 (Fri, 10 Dec 2004)
New Revision: 4125
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=4125
Log:
Fix from Bj?\195?\182rn Jacke <bjoern at j3e.de> for bugid #2040 - ensure the locale
is reset to C to get ASCII-compatible toupper/lower functions.
Jeremy.
Modified:
trunk/source/lib/charcnv.c
Changeset:
Modified: trunk/source/lib/charcnv.c
===================================================================
--- trunk/source/lib/charcnv.c 2004-12-10 04:41:56 UTC (rev 4124)
+++ trunk/source/lib/charcnv.c 2004-12-10 05:49:44 UTC (rev 4125)
@@ -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";
More information about the samba-cvs
mailing list