Skip to content

Instantly share code, notes, and snippets.

@ConorOBrien-Foxx
Created December 16, 2021 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ConorOBrien-Foxx/0b5c41012830279b5ba109d9f60aec4f to your computer and use it in GitHub Desktop.
Save ConorOBrien-Foxx/0b5c41012830279b5ba109d9f60aec4f to your computer and use it in GitHub Desktop.
Sample implementation of a basic codepage.
codepage = "⊙⊚⊛⊡⋄∘⨕⨖⨞⫇⫈αβγδεζηθι !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~←↑→↓" #...
unicode_result = ""
with open("sample.txt", "rb") as f:
while (byte := f.read(1)):
unicode_result += codepage[ord(byte)]
print(unicode_result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment