On 5/16/20 6:16 PM, Thiago Macieira wrote:
That opens a philosophical question. In:

     QString s = u"a a\u0301"; // U+0301 COMBINING ACUTE ACCENT
     s.replace('a', 'b');

Should we now have a b with accent? (b́)

It's not philosophical at all, it's a defining question: at which level does QString operate? It does not operate at the EGC level, it operates at the UTF-16 level. (Proof: s.size() above is 4). Hence, the replace() above is merely replacing 0x0061 with 0x0062 in the char16_t-like storage.

My 2 c,
--
Giuseppe D'Angelo | giuseppe.dang...@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 - The Qt, C++ and OpenGL Experts

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

Reply via email to