Peter Eisentraut <[EMAIL PROTECTED]> writes: > Nicolai Tufar wrote: >> Don't do it! I just tried it with only LC_ALL and it did not >> work. Same "tags file is not sorted" error message from vi.
> On second look, the patch is completely wrong anyway, because it does > not export the variables; it depends on the user having exported them > beforehand. I saw that, but it seemed a non-problem to me: if the variables have not been exported then they won't affect the sort program anyway. I tried to reproduce Nicolai's statement about LC_ALL not being sufficient, but AFAICT Fedora Core 1 handles this as expected: $ cat /etc/redhat-release Fedora Core release 1 (Yarrow) $ LANG=en_US LC_ALL=en_GB locale LANG=en_US LC_CTYPE="en_GB" LC_NUMERIC="en_GB" LC_TIME="en_GB" LC_COLLATE="en_GB" LC_MONETARY="en_GB" LC_MESSAGES="en_GB" LC_PAPER="en_GB" LC_NAME="en_GB" LC_ADDRESS="en_GB" LC_TELEPHONE="en_GB" LC_MEASUREMENT="en_GB" LC_IDENTIFICATION="en_GB" LC_ALL=en_GB $ cat zzz abc DEF ABC DEF $ LANG=C sort zzz ABC DEF abc DEF $ LANG=en_US sort zzz abc DEF ABC DEF $ LANG=en_US LC_ALL=C sort zzz ABC DEF abc DEF What I suspect is that Nicolai's environment supplies an explicit value for LC_COLLATE, overriding both LC_ALL and LANG. If we want to be bulletproof against that, then none of the proposals in this thread are correct, and the correct patch is + LC_COLLATE=C + export LC_COLLATE regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 7: don't forget to increase your free space map settings