Similar looking UTF8 characters for ASCII

眉间皱痕 提交于 2019-12-22 00:13:12

问题


I'm looking for a table which contains ASCII characters and same looking UTF8 characters. I know it also depends on the font is they look the same, but something generic to start with is enough.

>>> # PY3 code:
>>> a='H'  # ascii
>>> b='Н'  # utf8
>>> a==b
False
>>> ' '.join(format(ord(x), 'b') for x in a)
'1001000'
>>> ' '.join(format(ord(x), 'b') for x in b)
'10000011101'
>>> a='P'  # ascii
>>> b='Ρ'  # utf8
>>> a==b
False
>>> ' '.join(format(ord(x), 'b') for x in a)
'1010000'
>>> ' '.join(format(ord(x), 'b') for x in b)
'1110100001'

回答1:


This is very useful tool as it will show you all characters which look similar and you can choose if this is REALLY similar enough for you :)

https://unicode.org/cldr/utility/confusables.jsp?a=test&r=None

Some other resources:

  • This is called Visual Spoofing

  • Python Package to detect confusables



来源:https://stackoverflow.com/questions/46871728/similar-looking-utf8-characters-for-ascii

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!