<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font face="FreeSerif">To produce Xiphos' module trees (sidebar,
mod.mgr, adv.search), I sort by language using qsort+strcmp. This
was recently pointed out as being poor for UTF-8 strings, and I
replaced strcmp with strcoll. This works fine in Linux.
Unfortunately, the Win32 version of strcoll believes in UTF-16,
even when the locale is set to xx_YY.UTF-8, and this mis-sorts
everything, e.g. Čeština lands in the middle of the "A" region.
Are there any suggestions for a suitable comparator I can use with
qsort, that won't make me do a huge amount of transcoding everything
to UTF-16 when the strings and the app are otherwise entirely
driven in UTF-8?<br>
</font>
</body>
</html>