From 5a4881bf396e691524329bcd6aa1ae4a7f4084ec Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Tue, 27 Dec 2005 20:52:36 +0000 Subject: r12522: Try and fix bug #2926 by removing setlocale(LC_ALL, "C") and replace calls to isupper/islower/toupper/tolower with ASCII equivalents (mapping into _w variants). Jeremy. (This used to be commit c2752347eb2deeb2798c580ec7fc751a847717e9) --- source3/lib/charcnv.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'source3/lib/charcnv.c') diff --git a/source3/lib/charcnv.c b/source3/lib/charcnv.c index 0c806167f4..c4eeab135e 100644 --- a/source3/lib/charcnv.c +++ b/source3/lib/charcnv.c @@ -84,15 +84,6 @@ static const char *charset_name(charset_t ch) } 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"; @@ -747,7 +738,7 @@ char *strdup_upper(const char *s) while (1) { if (*p & 0x80) break; - *q++ = toupper(*p); + *q++ = toupper_ascii(*p); if (!*p) break; p++; -- cgit