[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Locales/sort bug



I have some form of workaround.
When I know sort field separator (which was the case in my original
example), I can use that to overcome the limitations with:

$ LC_ALL=pl_PL.UTF-8 sort -k1,1 -t',' test.csv
aph3,"APP",""
aph3,"MiB",""
aph3_devel,"TXT",""
# everything fine

$ LC_ALL=pl_PL.UTF-8 sort test.csv
aph3,"APP",""
aph3_devel,"TXT",""
aph3,"MiB",""
# previous results, unexpected

My conclusion for now would be:
- if you don't know field separator
-- if there are only ASCII characters - use POSIX collate
-- if there are different characters (i18n) - don't have solution
- if you know field separator
-- specify it in sort command

Regards,
Robert


Reply to: