prize18-1 Exercise 1: Code Points and Byte Counts =================================================== Predictions: ASCII letters need 1 byte; U+0080-U+07FF need 2; U+0800-U+FFFF need 3; U+10000 and above need 4. So: A=1, ss (U+00DF)=2, Omega (U+03A9)=2, euro (U+20AC)=3, the CJK character (U+8A9E)=3, party popper (U+1F389)=4. ex1.py: for ch in ["A", "\u00df", "\u03a9", "\u20ac", "\u8a9e", "\U0001F389"]: cp = ord(ch) print(f"{ch} U+{cp:04X} decimal={cp:<7} utf-8 bytes={len(ch.encode('utf-8'))}") Real output (Python 3.14, run with py -X utf8 ex1.py): A U+0041 decimal=65 utf-8 bytes=1 ß U+00DF decimal=223 utf-8 bytes=2 Ω U+03A9 decimal=937 utf-8 bytes=2 € U+20AC decimal=8364 utf-8 bytes=3 語 U+8A9E decimal=35486 utf-8 bytes=3 🎉 U+1F389 decimal=127881 utf-8 bytes=4 The byte count grows with the size of the code point, matching the ranges in the chapter. Note: the \u escapes above are written as plain escapes so the file itself stays ASCII.