charcnv: removed call to setlocale() (bug 7519)
authorAndrew Tridgell <tridge@samba.org>
Fri, 4 Feb 2011 05:04:30 +0000 (16:04 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 4 Feb 2011 05:51:01 +0000 (06:51 +0100)
We don't need this setlocale() call, and it can break applications
that use our libraries

Thanks to Milan Crha for pointing this out

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Fri Feb  4 06:51:01 CET 2011 on sn-devel-104

lib/util/charset/charcnv.c

index f8aeea34b8bc5a0dc5049c02f734a791f70b536e..59b36e30621dfa72fc03d5195e076ef3c6a397be 100644 (file)
@@ -139,16 +139,6 @@ static smb_iconv_t get_conv_handle(struct smb_iconv_convenience *ic,
 
        if (initialised == false) {
                initialised = true;
-               
-#ifdef LC_ALL
-               /* 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
        }
 
        if (ic->conv_handles[from][to]) {