Re: Short questions wrt Python & Unicode

2006-06-09 Thread KvS
John Machin wrote: > On 9/06/2006 10:04 PM, KvS wrote: > > > 2) How do I get a representation of a unic. object in terms of Unicode > > code points? repr() doesn't do that, it sometimes parses or encodes the > > code points right: > > > >|>>> s=u"\u0040\u0166\u00e6" > >|>>> s > > u'@\u0166\xe6' >

Re: Short questions wrt Python & Unicode

2006-06-09 Thread Fredrik Lundh
KvS wrote: s=u"\u0040\u0166\u00e6" s > u'@\u0166\xe6' > > (does this latter \xe6 have to do with the internal representation of > unic. objects, maybe with this UCS-2 encoding?) no, it's simply the shortest way to represent U+00E6 as Python Unicode string literal, when limited to ASC

Re: Short questions wrt Python & Unicode

2006-06-09 Thread John Machin
On 9/06/2006 10:04 PM, KvS wrote: > 2) How do I get a representation of a unic. object in terms of Unicode > code points? repr() doesn't do that, it sometimes parses or encodes the > code points right: > >|>>> s=u"\u0040\u0166\u00e6" >|>>> s > u'@\u0166\xe6' |>>> ' '.join('U+%04X % ord(c) for c

Short questions wrt Python & Unicode

2006-06-09 Thread KvS
Hi all, I've been reading about unicode in general and using it in Python in particular lately as this turns out to be not so straightforward actually. I wanted to aks two questions: 1) I'm writing a program that interacts with the user through wxPython (unicode build) and stores & retrieves data