Lurker News
Back to discussion

Comment by eqvinox

eqvinox2 replies#
I haven't read most of that rant, but a thread-local setlocale() would be a godsend. Not sure if that's ISO C or POSIX though.
wahern#
POSIX has added _l variants taking a locale_t argument to all the relevant string functions. I can see how per-thread state would be convenient, but it's not a comprehensive solution. With the _l variants you can write your own wrappers that pass a per-thread locale_t object.
EdSchouten#
That's uselocale().