[Development] Qt6: Adding UTF-8 storage support to QString

Alexander Akulich akulichalexander at gmail.com
Tue Jan 15 21:11:40 CET 2019


Cristian,

the previous discussion is "Why can't QString use UTF-8 internally?"
There is something wrong with our maillist, the best link I found is
[1]. For some reason link to the thread head [2] is broken.

[1] https://lists.qt-project.org/pipermail/development/2015-February/040199.html
[2] https://lists.qt-project.org/pipermail/development/2015-February/020155.html

On Tue, Jan 15, 2019 at 9:48 PM Cristian Adam <cristian.adam at gmail.com> wrote:
>
> Hi,
>
> With every Qt release we see how the new release improved over previous releases in terms of speed, memory consumption, etc.
>
> Any chance of having UTF-8 storage support for QString?
>
> UTF-8 is native on Linux and other *NIX platforms, Qt programs should use less memory, and perform better by reading less bytes from memory.
>
> Did anybody try this?
>
> I've heard that Qt Creator is storing sources files both in UTF-8 format for libclang, and UTF16 for its internal usage. That sounds like a bit wasteful.
>
> KDE Plasma could then better compare / compete with the other Linux desktop environments which use UTF-8 for strings.
>
> I guess I could use CopperSpice to test this, since they added CsString with both QString8 (UTF-8) and QString16 (UTF-16) supported.
>
> https://utf8everywhere.org/ states "UTF-16 is the worst of both worlds, being both variable length and too wide"
>
> Cheers,
> Cristian.
> _______________________________________________
> Development mailing list
> Development at qt-project.org
> https://lists.qt-project.org/listinfo/development



More information about the Development mailing list