[Lazarus] UTF8 string compare with correct locale sorting

Jürgen Hestermann juergen.hestermann at gmx.de
Thu Oct 17 17:25:13 CEST 2013


I fully aggree on this

http://www.utf8everywhere.org/

and therefore want to use UTF8 in all my programs.
But the problem is sorting UTF8 strings.
According to

http://forum.lazarus.freepascal.org/index.php?topic=15256.0

UTF8CompareText would be the best choice and it runs quite fast.
But it does not obey sorting by locale (i.e. german umlauts end
up at the end of the list although they need to be sorted together with
their corresponding non-umlaut  characters (Ü at U, Ä at A, and so on).

Does *any* Pascal UTF8 string compare function exist that does this?







More information about the Lazarus mailing list