Skip to content

Instantly share code, notes, and snippets.

View michael-lazar's full-sized avatar
🙂
What I cannot create, I do not understand

Michael Lazar michael-lazar

🙂
What I cannot create, I do not understand
View GitHub Profile
@michael-lazar
michael-lazar / zero-byte
Created November 11, 2020 18:58
unicode NUL character
# Unicode code point zero (aka ascii NUL control character)
>>> u"\u0000"
# Is only one code-point long
>>> len(u"\u0000")
1
# Encodes to 0x00 in hex (aka 0000 0000 in binary)
>>> u"\u0000".encode("utf-8")
b'\x00'