I am having trouble getting sort to produce output that is sorted by native byte value.
This means that I want
a
A
a
A
B
B
b
B
b
to become
A
A
B
B
B
a
a
b
b
not
a
a
A
A
b
b
B
B
B
as is the case with sort from gnuwin32 coreutils-5.3.0
Trouble with the locale is probably the cause of this. I have seen several other posts about this problem on this forum, indicating that sort uses the default locale no matter what LC_ALL is set to. Has anyone found a solution?
Thanks in advance
Dag S.E.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Blame Microsoft for this -- their setlocale' implementation honours neitherLANG' nor LC_CATEGORY' settings in the environment; neither are their language and territory codes compatible with the relevant ISO standards, which GNUsort' expects.
FWIW, I've been working on a setlocale' wrapper library for MinGW, to add ISO-639-1/2 and ISO-3166LC_CATEGORY' support; I can make this available to anyone who cares to rebuild the GnuWin32 tools to use it, but it is in very much an embryonic state at present.
Regards,
Keith.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having trouble getting sort to produce output that is sorted by native byte value.
This means that I want
a
A
a
A
B
B
b
B
b
to become
A
A
B
B
B
a
a
b
b
not
a
a
A
A
b
b
B
B
B
as is the case with sort from gnuwin32 coreutils-5.3.0
Trouble with the locale is probably the cause of this. I have seen several other posts about this problem on this forum, indicating that sort uses the default locale no matter what LC_ALL is set to. Has anyone found a solution?
Thanks in advance
Dag S.E.
Blame Microsoft for this -- their
setlocale' implementation honours neitherLANG' norLC_CATEGORY' settings in the environment; neither are their language and territory codes compatible with the relevant ISO standards, which GNUsort' expects.FWIW, I've been working on a
setlocale' wrapper library for MinGW, to add ISO-639-1/2 and ISO-3166LC_CATEGORY' support; I can make this available to anyone who cares to rebuild the GnuWin32 tools to use it, but it is in very much an embryonic state at present.Regards,
Keith.