mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
r4126: Fix from Björn Jacke <bjoern@j3e.de> for bugid #2040 - ensure the locale
is reset to C to get ASCII-compatible toupper/lower functions.
Jeremy.
(This used to be commit 8e1b1693ab
)
This commit is contained in:
parent
822fcec39d
commit
92a7eb69d3
@ -84,6 +84,15 @@ static const char *charset_name(charset_t ch)
|
|||||||
}
|
}
|
||||||
ret = ln;
|
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
|
#endif
|
||||||
|
|
||||||
if (!ret || !*ret) ret = "ASCII";
|
if (!ret || !*ret) ret = "ASCII";
|
||||||
|
Loading…
Reference in New Issue
Block a user