[SciPy-dev] Some Q's vis-a-vis Numpy unicode support

Scott David Daniels Scott.Daniels at Acm.Org
Tue Aug 18 11:27:35 EDT 2009


More tools to explore unicode:
     unicodedata.name
     sys.maxunicode

 >>> import unicodedata
 >>> for n in xrange(32, 300):
     ch = unichr(n)
     if ch.lower() == ch.upper():
         print n, unicodedata.name(ch, 'Unknown')

 >>> text = u'\N{COLON}\N{COPYRIGHT SIGN}\N{INVERTED QUESTION MARK}'
 >>> print len(text)
3
 >>> [ord(ch) for ch in text]
[58, 169, 191]

--Scott David Daniels
Scott.Daniels at Acm.Org




More information about the SciPy-Dev mailing list