On Mon, Dec 28, 2015 at 08:42:19PM -0200, Henrique de Moraes Holschuh wrote:
On Mon, 28 Dec 2015, Ondrej Zajicek wrote:
Results are alphabetically sorted. The wildcard expansion is implemented by standard glob() libc function, and unfortunately both Single UNIX specification and GNU C library documentation are lacking details about that. I would expect that it is a plain ASCII, non-localized alphabetic sort.
In glibc, glob() is locale-aware and it will use the locale's collating order. ... That said, glibc will default the entire program to the C locale (or maybe C.UTF-8 nowadays), unless setlocale() has been called.
If you are working in an unknown locale, though (e.g. setlocale() was called to set the process locale to the system's locale), do *NOT* assume the sorting will look like what you'd get out of ASCII.
That is true, but we do not call setlocale(). That is the reason why i would expect it to be a plain ASCII, non-localized alphabetic sort. -- Elen sila lumenn' omentielvo Ondrej 'Santiago' Zajicek (email: santiago@crfreenet.org) OpenPGP encrypted e-mails preferred (KeyID 0x11DEADC3, wwwkeys.pgp.net) "To err is human -- to blame it on a computer is even more so."