On Fri, May 13, 2016 at 07:15:11PM +0200, Nenad Merdanovic wrote: > Hello Willy, > > On 5/13/2016 7:04 PM, Willy Tarreau wrote: > > I don't know, I'm not fond of setting things in the back of the user like > > this. I don't even know if we have other parts that are currently sensitive > > to the locale and which could be affected. Wouldn't it be better to simply > > add this piece of information to the doc instead so that users know if they > > need to specially tweak their locale ? > > If we don't call 'setlocale', the tweaks will have no effect and we have > a difference in behavior between this way and the '-- foo/*.cfg', > because the latter will get expended by the shell in the ordered > specified by LC_COLLATE while the new way will order the files as if > LC_COLLATE was set to 'C'.
Ah OK that's what I did't know, that was not obvious from my reading of the doc, thank you. > Unless you are thinking of asking the user through the doc to adapt > their filenames so that they are not affected by the locale differences. No of course you're right, for me the purpose of the doc here was to let the user know we respect the locale and that it's his problem to ensure his sorting options are correct in his locale and match his shell for instance. But of course if for this to work we have to do something we must do it. Maxime, could you please add a call to setlocale(LC_ALL, "") as suggested by Nenad before starting to scan the directories ? If something isn't 100% clear to you, do not hesitate to ask for more details, you won't look stupid, I did before you :-) Thanks, Willy

