News for hackers. Stuff that matters.
Re:UTF-8 is a brilliant design by masklinn on Saturday September 13, 2025 @01:59AM (#45229695)
> PyCompactUnicodeObject was introduced with Python 3.3, and uses UTF-8 internally.

UTF8 is used for C level interactions, if it were just that being used there would be no need to know the highest code point.

For Python semantics it uses one of ASCII, iso-8859-1, ucs2, or ucs4.

Re:UTF-8 is a brilliant design by nostrademons on Saturday September 13, 2025 @10:41AM (#45232451)
Interesting. You're right. Code pointer:

https://github.com/python/cpython/blob/main/Objects/unicodeo...

Also implies that Animats is correct that including an emoji in a Python string can bloat the memory consumption by a factor of 4.