You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CMD window flashes (another issue) and stdout returned in the console with text in locale
Output in ASCII? encoding, not Windows locale
The reason is default Russian DOS and Windows are different, 866 and 1251, respectively
Spyder assume UTF-8 as default, but in the console don't care about it
Usual IPython "DOS" console "knows" it, and %print magic deals with encodings
==Unicode==
In [56]: s=u'мамa'
In [57]: s
Out[57]: u'\u043c\u0430\u043ca'
In [58]: p s
мамa
==Default text==
In [59]: s='мамa'
In [60]: s
Out[60]: '\xd0\xbc\xd0\xb0\xd0\xbca'
In [61]: p s
мамa
What is the expected output?
the same as input
=cf. In the "DOS" IPython=
In [3]: s='мама'
In [4]: s
Out[4]: '\xac\xa0\xac\xa0'
In [5]: p s
мама
In [1]: s=u"мама"
In [2]: s
Out[2]: u'\xac\xa0\xac\xa0'
In [3]: p s
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
From sherdim on 2011-02-11T16:13:01Z
What steps will reproduce the problem?
The reason is default Russian DOS and Windows are different, 866 and 1251, respectively
Spyder assume UTF-8 as default, but in the console don't care about it
Usual IPython "DOS" console "knows" it, and %print magic deals with encodings
==Unicode==
In [56]: s=u'мамa'
In [57]: s
Out[57]: u'\u043c\u0430\u043ca'
In [58]: p s
мамa
==Default text==
In [59]: s='мамa'
In [60]: s
Out[60]: '\xd0\xbc\xd0\xb0\xd0\xbca'
In [61]: p s
мамa
What is the expected output?
the same as input
=cf. In the "DOS" IPython=
In [3]: s='мама'
In [4]: s
Out[4]: '\xac\xa0\xac\xa0'
In [5]: p s
мама
In [1]: s=u"мама"
In [2]: s
Out[2]: u'\xac\xa0\xac\xa0'
In [3]: p s
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
In [10]: p s.encode('1251')
мама
Spyder 2.0.6, Windows Vista
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=556
The text was updated successfully, but these errors were encountered: