Bug#7519: setlocale() considered harmful in library functions

tridge at samba.org tridge at samba.org
Thu Feb 3 22:00:59 MST 2011


Hi Jelmer,

I think we can just remove the setlocale() call. Milan is right that
we should never be calling this in library code, and I also think it
just isn't necessary. 

I don't think we need the rest of the patch (to use ascii_toupper()
etc). We can't be using toupper()/tolower() on multi-byte strings, as
it doesn't support them, and in Samba we only really care about either
ASCII or multi-byte.

I'll remove the setlocale() call now, but please let me know if you
can think of a specific case where you are concerned it could affect
something.

Cheers, Tridge


More information about the samba-technical mailing list