Re: Encode differences between idle python and python

2006-10-11 Thread Neil Cerutti
On 2006-10-10, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Gabriel, Peter: > Many thanks for your clear answers!! Best regards. Something I've been working on is currently using the following trick: # Create some string of non-ASCII text in ISO 8859-1. some_string = ''.join(chr(a) for a in

Re: Encode differences between idle python and python

2006-10-10 Thread pretoriano_2001
Gabriel, Peter: Many thanks for your clear answers!! Best regards. Vizcayno -- http://mail.python.org/mailman/listinfo/python-list

Re: Encode differences between idle python and python

2006-10-10 Thread Gabriel Genellina
At Tuesday 10/10/2006 02:44, [EMAIL PROTECTED] wrote: >Hello: >Under win32 XP y select python command line and execute next code with >results indicated: > >Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit >(Intel)] on >Type "help", "copyright", "credits" or "license" for more info

Re: Encode differences between idle python and python

2006-10-09 Thread Peter Otten
[EMAIL PROTECTED] wrote: > >>> u=u'áéíóú' > >>> u > u'\xe1\xe9\xed\xf3\xfa' > >>> print u > áéíóú > >>> a=u.encode('latin-1') > >>> a > '\xe1\xe9\xed\xf3\xfa' > >>> print a > ßÚݾ· That means that Python is better at guessing the correct encoding than you are. Here's how you can make it share its

Encode differences between idle python and python

2006-10-09 Thread pretoriano_2001
Hello: Under win32 XP y select python command line and execute next code with results indicated: Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on Type "help", "copyright", "credits" or "license" for more information. >>> u=u'áéíóú' >>> u u'\xe1\xe9\xed\xf3\xfa' >>> prin