On Thursday, 19 September 2013 at 15:42:52 UTC, bearophile wrote:
Chris:

How do I sort text so that non-ascii characters like "á" are treated in the same way as "a"?

The correct solution is a well implemented, well updated and well debugged Unicode Collation Algorithm, as already answered. But if an approximation is enough then you could translate to D this Python code that converts a Unicode string to ASCII, and use it through a schwartzSort:

http://newsbruiser.tigris.org/source/browse/~checkout~/newsbruiser/nb/lib/AsciiDammit.py

(If you translate that function to D, you could also add it to Dub later.)

Bye,
bearophile

Ok, thanks. We'll see.

Reply via email to