From: KOSAKI Motohiro Date: 2013-05-06T22:13:05+09:00 Subject: [ruby-core:54827] Re: Call setlocale(LC_ALL, "") instead of setlocale(LC_CTYPE, "") >> Please elaborate more. Why don't you use strcoll_l()[?] > > I do, but it might not be available. > >> Why don't you use temporary locale changes such as: >> >> old_locale = setlocale(LC_COLLATE, NULL); >> setlocale(LC_COLLATE, your_faborite_locale); >> >> strcoll(blah blah); >> >> setlocaleLC_COLLATE, old_locale); > > Because it�s not thread safe. You can use GVL for that.