Is ICU4C out of the question? It has support for collation. See: 
http://site.icu-project.org/design/collation/v2 
<http://site.icu-project.org/design/collation/v2>

> On Jan 12, 2016, at 11:12 AM, Karl Kleinpaste <k...@kleinpaste.org> wrote:
> 
> 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?
> _______________________________________________
> sword-devel mailing list: sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page

_______________________________________________
sword-devel mailing list: sword-devel@crosswire.org
http://www.crosswire.org/mailman/listinfo/sword-devel
Instructions to unsubscribe/change your settings at above page

Reply via email to