user213154
user213154

Reputation:

Unix command-line sort utility with unicode support

The systems I use come with sort from GNU Coreutils which appears to not be happy with Unicode.

What else can you suggest?

Is there a command-line utility that uses libicu out there?

Upvotes: 2

Views: 3308

Answers (1)

thkala
thkala

Reputation: 86333

I don't know of any alternatives, but GNU sort seems to be working fine with UTF-8 on my system.

You should keep in mind that GNU sort depends on a correct locale setting (the LC_* environment variables, and specifically the LC_COLLATE one). LC_COLLATE (or LC_ALL) should be set to a locale with UTF-8 support (e.g. en_US.UTF-8 or el_GR.UTF-8), preferrably in the language that you are interested in.

What is the value of the LC_COLLATE environment variable in your system? What specific Unicode variant are you interested in? And more importantly, what is the exact problem that you are dealing with?

Upvotes: 3

Related Questions