-
-
Save Peilonrayz/215a596b40309f49a9740896b886725b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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