Hi

Okay, first the context. I want to write locale aware compare collations for a 
local database which is saving the text in UTF-8. So converting the text always 
with QString::fromUtf8 is a little bit expensive. Under Unix strcoll would work 
but for windows there is no UTF-8 collation. One idea around that problem is to 
convert per character to UTF-16 and than compare it. Is there some internal API 
where I could do the conversion per character(not per byte)?

Anyway, best would be:

QCollator<http://qt-project.org/doc/qt-5/qcollator.html#QCollator>::compare<http://qt-project.org/doc/qt-5/qcollator.html#compare>(const
 char *utf8String1, const char *utf8String2, size_t size1=-1, size_t size2=-1) 
const

Thank you, Marco
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to