Re: converting u'11\xa022' to '11\xa022'

2007-02-21 Thread Gabriel Genellina
En Wed, 21 Feb 2007 06:24:55 -0300, Laurent Pointal <[EMAIL PROTECTED]> escribió: > Gabriel Genellina a écrit : >> En Wed, 21 Feb 2007 00:31:32 -0300, alf <[EMAIL PROTECTED]> escribió: > >>> 2-list of supported encodings? >> I don't know how to query the list, except by reading the documenta

Re: converting u'11\xa022' to '11\xa022'

2007-02-21 Thread Laurent Pointal
Gabriel Genellina a écrit : > En Wed, 21 Feb 2007 00:31:32 -0300, alf <[EMAIL PROTECTED]> escribió: >> 2-list of supported encodings? > I don't know how to query the list, except by reading the documentation > for the codecs module. >>> from encodings import aliases >>> aliases.aliases {'iso_

Re: converting u'11\xa022' to '11\xa022'

2007-02-20 Thread Gabriel Genellina
En Wed, 21 Feb 2007 00:31:32 -0300, alf <[EMAIL PROTECTED]> escribió: > one more question, once a unicode object is created e.g. > > u=unicode('hello', 'iso-8859-1') > > is there any way to find: > 1-original encoding of u No. It's like, if you have variable "a" with value 10, you can't kno

Re: converting u'11\xa022' to '11\xa022'

2007-02-20 Thread alf
Jean-Paul Calderone wrote: > u'11\xa022'.encode('charmap') thx a lot. one more question, once a unicode object is created e.g. u=unicode('hello', 'iso-8859-1') is there any way to find: 1-original encoding of u 2-list of supported encodings? A. -- http://mail.python.org/mailma

Re: converting u'11\xa022' to '11\xa022'

2007-02-20 Thread Jean-Paul Calderone
On Tue, 20 Feb 2007 18:12:42 -0600, alf <[EMAIL PROTECTED]> wrote: >Hi, >is there a more elegant way to do that: > >''.join([chr(ord(i)) for i in u'11\xa022' ]) > u'11\xa022'.encode('charmap') Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list

converting u'11\xa022' to '11\xa022'

2007-02-20 Thread alf
Hi, is there a more elegant way to do that: ''.join([chr(ord(i)) for i in u'11\xa022' ]) -- thx, alf -- http://mail.python.org/mailman/listinfo/python-list