[Development] Qt6: Adding UTF-8 storage support to QString
arnaud.clere at minmaxmedical.com
Fri Jan 25 10:59:51 CET 2019
> ----Original Message-----
> From: Thiago Macieira <thiago.macieira at intel.com>
> But we WILL NOT change from UTF-16 in the next 2 years.
>From a user standpoint, this seems perfectly Ok to me.
I do not buy the argument that if switching QString to utf8 make developer bugs appear sooner, this is a good thing.
Most user code I have written or seen handles text data naively and is incorrect in some respect but I think only a minority of if is leading to real problems because input data will rarely trigger them.
Although not perfect, using 16 bits "characters" for QString and Windows API is good approximation that helped a lot make user code more robust without requiring understanding charsets and encodings.
At least, it saved me a lot of time if I remember correctly the kind of bugs I was dealing with in the 90's.
So, IMHO, accessing QString content in utf8 "character" units should remain an explicit choice, not the default one.
Even choosing utf8 internally QString for performance reasons seems dubious to me, at least for a good half of the world...
More information about the Development