PEP 3131: Supporting Non-ASCII Identifiers
Sion Arrowsmith
siona at chiark.greenend.org.uk
Tue May 15 12:35:47 EDT 2007
Aldo Cortesi <aldo at nullcube.com> wrote:
> [ ... ] There is no general way to detect homoglyphs and "convert them to
>a normal form". Observe:
>
>import unicodedata
>print repr(unicodedata.normalize("NFC", u"\u2160"))
>print u"\u2160"
>print "I"
FYI, those come out as two very clearly distinct glyphs in the
default terminal font I have here. (The ROMAN NUMERAL ONE has no
cross-bars, and is more likely to be confused with "|".)
--
\S -- siona at chiark.greenend.org.uk -- http://www.chaos.org.uk/~sion/
"Frankly I have no feelings towards penguins one way or the other"
-- Arthur C. Clarke
her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
More information about the Python-list
mailing list