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

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Tue Jun 11 21:09:17 CEST 2024


Il 11/06/24 11:36, David C. Partridge ha scritto:
> Anyone iterating bytewise over a char[] in UTF-8 has also got serious
> bugs given that a UTF-8 "graphic character" can be up to 8 bytes
> (national flags comprise two UTF-8 code points).

There's no such thing as a UTF-8 "graphic character". Grapheme sequences 
are treated at a higher level anyhow in Qt, and we have APIs for that 
(QTextBoundaryFinder, etc.).

And it's not 2. 🏴󠁧󠁢󠁷󠁬󠁳󠁿 is 7 code points.

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - Trusted Software Excellence

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4244 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240611/d608c5a6/attachment.bin>


More information about the Development mailing list