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

Scott David Daniels Scott.Daniels@Acm....
Tue Aug 18 10:27:35 CDT 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@Acm.Org



More information about the Scipy-dev mailing list