---- run in a python shell
Note: this a utf-8 text file
we are: converting a UTF-8 Hex code point to ord to char - by hand
---- utf-8 code point
>>> 0xf09f8c88
4036988040
---- hex utf-8 code point
>>> h = 0xf09f8c88
>>> hex(h)
'0xf09f8c88'
---- convert each byte to a bin
>>> a = [ bin(0xf0), bin(0x9f), bin(0x8c), bin(0x88) ]
>>> a
['0b11110000', '0b10011111', '0b10001100', '0b10001000']
# ---- collect the bits into an ord value from the utf-8 encoding
>>> b = 0b000011111001100001000 (00000001 11110011 00001000)
>>> b
127752 <--- decimal
>>> hex(b)
'0x1f308' <--- hex (fill in the bytes 0x 01f308)
# ---- the character is from the utf-8 Symbols and Emojis (a colored rainbow)
>>> chr(b)
í ¼í¼ˆ <--- not right char, this actually works
< --- copy and paste is the problem