Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Strings with national specific characters are wrongly sorted - Sort
Re: Strings with national specific characters are wrongly sorted - Sort [message #57470 is a reply to message #57468] Thu, 26 August 2021 13:09 Go to previous messageGo to previous message
busiek is currently offline  busiek
Messages: 70
Registered: February 2011
Location: Poland
Member
For Polish alphabet I use such function to map wchar into something comparable according to our needs:
auto CharRepr = [](wchar c)
{
    wchar d = ToLower(c);
    d = d == u'ł' ? 'l' : d;
    return MakeTuple(IsLetter(c), ToAscii(d), c);
};

Then, to compare, I map each WString into the appropriate vector of tuples.

Cheers,
Kuba
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Probable nasty bug with StringBuffer
Next Topic: POSIX home directory symbol '~' is causing trouble
Goto Forum:
  


Current Time: Mon Aug 25 11:36:30 CEST 2025

Total time taken to generate the page: 0.00532 seconds