a simple unicode question

Chris Jones cjns1989 at gmail.com
Wed Oct 21 11:16:56 CEST 2009


On Wed, Oct 21, 2009 at 12:20:35AM EDT, Nobody wrote:
> On Tue, 20 Oct 2009 17:56:21 +0000, George Trojan wrote:

[..]

> > Where are the literals (i.e. u'\N{DEGREE SIGN}') defined? 
> 
> You can get them from the unicodedata module, e.g.:
> 
> 	import unicodedata
> 	for i in xrange(0x10000):
> 	  n = unicodedata.name(unichr(i),None)
> 	  if n is not None:
> 	    print i, n

Python rocks!

Just curious, why did you choose to set the upper boundary at 0xffff?

CJ



More information about the Python-list mailing list