On Fri, May 13, 2016 at 06:38:06PM +0200, Nenad Merdanovic wrote:
> Hello Willy,
> 
> On 5/13/2016 12:54 PM, Willy Tarreau wrote:
> > Wait a minute, what do you mean by "different lower/upper case sorting" ?
> > Do you mean that alphasort() ignores the case ? I'm seeing no mention about
> > it in the man page, so I'm confused. If this is the case, it can be annoying
> > for the same reason.
> 
> Sorry for my vagueness, was writing a response in a hurry so didn't
> explain it well. The thing is, we don't set the locale anywhere within
> HAproxy, as far as I am aware at least. The shell expansion will honor
> LC_COLLATE, while the ordering of scandir's alphasort will default to C.

OK, thanks for clarifying.

> Maybe it would be worth adding 'setlocale(LC_ALL, "")' before, so we
> pick up the user's environment?

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 ? Do not hesitate to tell me if I'm
wrong on something, I always try to stay away from locale manipulation
because I know how painful everything becomes once you start to break the
fragile equilibrium!

Thanks,
Willy


Reply via email to