On Sun, Sep 2, 2012 at 10:08 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> On Wed, 2012-08-29 at 10:31 -0700, Aleksey Tsalolikhin wrote:
>> What is the difference between C and en_US.UTF8, please?
>
> There are many differences, but here is a simple one:
>
> $ (echo a; echo A; echo b; echo B) | LC_ALL=C sort
> ...
> $ (echo a; echo A; echo b; echo B) | LC_ALL=en_US.utf8 sort
> ...
Beautifully illustrated, and in a language I readily understand as a UNIX
sys admin. Thank you, Peter!
Thank you, Bruce, Merlin, and everybody else who replied.
I love the flexibility 9.1 allows to have a default sort locale with ability
to alter locale per-query if needed. It gives us the confidence to move forward
with switching to C for sorting -- right now we only need to sort on US
English data, so this is a perfect fit. When we internationalize, 9.1
allows us to switch back to UTF8-based sorting if needed. I love it!
Thank you!
Aleksey