I am looking for a method to compare and sort UTF-8 strings in C++ in a case-insensitive manner to use it in a custom collation function in SQLite.
If you are using it to do searching and sorting for your locale only, I suggest your function to call a simple replace function that convert both multi-byte strings into one byte per char ones using a table like:
A -> a
à -> a
á -> a
ß -> ss
Ç -> c
and so on
Then simply call strcmp and return the results.