Sorting with non-ASCII characters

Chris wendlec at tcd.ie
Thu Sep 19 08:38:35 PDT 2013


On Thursday, 19 September 2013 at 15:34:28 UTC, monarch_dodra 
wrote:
> On Thursday, 19 September 2013 at 15:18:11 UTC, Chris wrote:
>> Short question in case anyone knows the answer straight away:
>>
>> How do I sort text so that non-ascii characters like "á" are 
>> treated in the same way as "a"?
>>
>> Now I'm getting this:
>>
>> [wow, ara, ába, marca]
>>
>> ===> sort(listAbove);
>>
>> [ara, marca, wow, ába]
>>
>> I'd like to get:
>>
>> [ ába, ara, marca, wow]
>>
>> Thanks.
>
> Short answer, we currently can't, because we haven't 
> implemented the "Unicode Collation Algorithm"
> http://d.puremagic.com/issues/show_bug.cgi?id=10566
>
> Unfortunately, I don't know of any workarounds for you :/

Good that I asked! Imagine the time I would have wasted.



More information about the Digitalmars-d-learn mailing list