Tom Lane wrote:
> 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.
He probably had LANG, but not LC_ALL, already exported in his
environment. So when the shell program writes:
LC_ALL=C
then sort doesn't see it, because it is not exported, but LANG is still
exported with the value he doesn't want. The solution is to export
LC_ALL.
> 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
You have both LC_ALL and LANG exported.
> 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
That's not possible, because LC_ALL overrides everything.