Title: Re: [Pythonmac-SIG] ascii <-> unicode <-> cocoa NSString

On 2/20/06 1:05 PM, "Keith Ray" <[EMAIL PROTECTED]> wrote:

> Help ?

You encode from Unicode, and decode to Unicode:

>>> 'hi there'.decode('ascii')
u'hi there'
>>> u'hi there'.encode('ascii')
'hi there'

Dave

_______________________________________________
Pythonmac-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to