views:

79

answers:

2

Is it possible to specify per-thread in Linux?

+3  A: 

No. setlocale(3) changes it for the whole process.

Ignacio Vazquez-Abrams
+2  A: 

Yes, you kinda can do that. However not per-thead, but only per-call, using locale_t structures.

Read more about that at POSIX:

http://www.opengroup.org/onlinepubs/9699919799/functions/newlocale.html

And Ulrich Dreppper's dedsgin documents of what whent into glibc 2.1:

http://people.redhat.com/drepper/tllocale.ps.gz

`uselocale` ( http://www.opengroup.org/onlinepubs/9699919799/functions/uselocale.html# ) does let you set a thread-local locale.
caf