[Development] Why can't QString use UTF-8 internally?

Konstantin Ritt ritt.ks at gmail.com
Wed Feb 11 01:05:02 CET 2015


Previously you said QString::data() must return QChar* (and not a generic
uchar*), so that QString with an adaptive storage would have to silently
convert the internal encoding into the one represented by QChar.
If QString has a UCS-4 indexes and length() that counts the amount of UCS-4
codepoints, one would expect QString::data() to return UCS-4*, right?

Regards,
Konstantin

2015-02-11 3:33 GMT+04:00 Thiago Macieira <thiago.macieira at intel.com>:

> On Wednesday 11 February 2015 02:19:59 Konstantin Ritt wrote:
> > Can QChar represent a 32 bits codepoint, then?
>
> Yes, it could be widened. But what's the advantage in using UCS-4?
>
> --
> Thiago Macieira - thiago.macieira (AT) intel.com
>   Software Architect - Intel Open Source Technology Center
>
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20150211/82b618b9/attachment.html>


More information about the Development mailing list