[Development] Are char literals L1 or U8 in Qt?
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Wed Jun 12 11:02:11 CEST 2024
On 12/06/2024 10:51, Edward Welbourne wrote:
> I'll trust Peppe's count is thus of bytes in UTF-8.
No, it's 7 code *points*. Regional flags have a complicated encoding
scheme. Wales' flag is encoded as:
U+1F3F4 WAVING BLACK FLAG
U+E0067 TAG LATIN SMALL LETTER G
U+E0062 TAG LATIN SMALL LETTER B
U+E0077 TAG LATIN SMALL LETTER W
U+E006C TAG LATIN SMALL LETTER L
U+E0073 TAG LATIN SMALL LETTER S
U+E007F CANCEL TAG
Each one requires 4 UTF-8 code units, that is, a total of 28 bytes.
My point was that Unicode is incredibly complicated, and one should just
use higher-level facilities that know how to do this.
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: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/development/attachments/20240612/866446b8/attachment.bin>
More information about the Development
mailing list