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

Oswald Buddenhagen oswald.buddenhagen at theqtcompany.com
Tue Feb 10 22:17:00 CET 2015

On Wed, Feb 11, 2015 at 12:37:41AM +0400, Konstantin Ritt wrote:
> Yes, that would be an ideal solution. Unfortunately, that would also
> break a LOT of existing code.
i was thinking of making it explicit with a smooth migration path - add
QUtf8String (basically QByteArray, but don't permit implicit conversion
to avoid encoding mistakes) and QUcs4String (and QUtf16String as an
alias for current QString - for all the windows function calls). the
main effort would be adding respective overloads to all our api. then
deprecate QString, and prune it in qt6. then maybe re-add it as an
alias for utf8string a few minor versions down. does that sound

> In Qt4 times, I was doing some experiments with the QString adaptive
> storage (similar to what NSString does behind the scenes).
ah, you actually experimented with it. andre and me only ponder the idea
from time to time. ^^

More information about the Development mailing list