[Python-ideas] Support Unicode code point notation

Bruce Leban bruce at leapyear.org
Thu Aug 1 19:14:11 CEST 2013


I wonder if this should also support the special labels for characters
without names:

control-NNNN
reserved-NNNN
noncharacter-NNNN
private-use-NNNN
surrogate-NNNN

see p. 138 of http://www.unicode.org/versions/Unicode6.2.0/ch04.pdf

I would think that unicodedata.name should not return these, but perhaps
unicodedata.lookup should accept them. Note that the doc says that these
are frequently displayed enclosed in <>, so perhaps

unicodedata.lookup('U+0001')
== unicodedata.lookup('control-0001')
== unicodedata.lookup('<control-0001>')
== '\x01'

--- Bruce
I'm hiring: http://www.cadencemd.com/info/jobs
Latest blog post: Alice's Puzzle Page http://www.vroospeak.com
Learn how hackers think: http://j.mp/gruyere-security
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130801/9e7ad3f4/attachment.html>


More information about the Python-ideas mailing list