1
I am looking for a solution for sorting in postgres but it seems to be more of a problem of collation and therefore I ask the question for the standard Unix sort command instead.
I have the following data:
A_A1
A\A2
A_A2
A\A1
after sort I get:
cat test.txt |sort
A_A1
A\A1
A_A2
A\A2
but I want:
A_A1
A_A2
A\A1
A\A2
I also tried LANG=C cat...
but to no avail.
So which collation rule would allow me to not ignore the special characters?
Arrgh stupid me.
LANG=C
works but not asbut only
of course! – Fabian – 2012-04-19T16:42:35.783
@Fabian:
LANG=C
does not work for me, actually, but that depends on that I have LC_COLLATE (which is the primary environment variable that affects collation). I'll add info on this in my answer. – Daniel Andersson – 2012-04-19T16:46:04.907