Skip to content

Instantly share code, notes, and snippets.

@Peilonrayz
Last active July 21, 2019 07:38
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 Peilonrayz/215a596b40309f49a9740896b886725b to your computer and use it in GitHub Desktop.
Save Peilonrayz/215a596b40309f49a9740896b886725b to your computer and use it in GitHub Desktop.
import unicodedata
def collisions(char):
char = unicodedata.normalize('NFKC', char)
for i in range(0x110000):
if unicodedata.normalize('NFKC', chr(i)) == char:
yield chr(i)
if __name__ == '__main__':
for char in collisions(input('Enter char: ')):
try:
print(char)
except UnicodeEncodeError:
print('-', ord(char))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment