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'\xe1\xe9\xed\xf3\xfa'>>u=u'áéíóú'
u
áéíóú>>print u
'\xe1\xe9\xed\xf3\xfa'>>a=u.encode('latin-1')
a
ßÚݾ·>>print a
<type 'str'>>>type(a)
<type 'unicode'>>>type(u)
using python IDLE I repeat the code, but get next differen result:>>>
IDLE 1.2
u'\xe1\xe9\xed\xf3\xfa'>>u=u'áéíóú'
u
áéíóú>>print u
'\xe1\xe9\xed\xf3\xfa'>>a=u.encode('latin-1')
a
áéíóú>>print a
<type 'str'>>>type(a)
<type 'unicode'>>>type(u)
What do you think is happending and how can I solve this ? The IDLE>>>
looks fine but command line has problems.