[Development] Are char literals L1 or U8 in Qt?

Thiago Macieira thiago.macieira at intel.com
Wed Jun 12 01:58:56 CEST 2024


On Tuesday 11 June 2024 13:03:11 GMT-7 Volker Hilsheimer via Development 
wrote:
> Also, if the character value is outside the US-ASCII range, then the only
> alternative would be to interpret it as an incomplete UTF-8 sequence, which
> can’t be the right answer. QString::arg(char) (or operator+(char), for that
> matter) is not usable as a tool to assembly a valid string from individual
> UTF-8 code points, after all.

I dispute the conclusion that we can use the API for an alternate purpose 
because its primary purpose is probably not what the user meant to do.

Ideally, we'd warn them by making the code fail to compile if they used it 
wrongly in the first place.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Principal Engineer - Intel DCAI Fleet Systems Engineering
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5152 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240611/eef0da81/attachment.bin>


More information about the Development mailing list