On Sun, May 5, 2013 at 11:56 PM, KOSAKI Motohiro <kosaki.motohiro / gmail.com> wrote: >> Precisely my point and precisely why setlocale should be called with >> LC_ALL. It”Ēs impossible to write extensions tat use locale-dependent >> functionality unless Ruby actively supports it. Your argument held >> equally true before setlocale(LC_CTYPE) was added, but still it was >> added. > 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.