[issue15809] Строки из IDLE поступают в неверной кодировке.

2012-08-29 Thread alex hartwig
New submission from alex hartwig: Это из IDLE: Python 2.7.2+ (default, Oct 4 2011, 20:03:08) [GCC 4.6.1] on linux2 Type copyright, credits or license() for more information. import sys import locale sys.getdefaultencoding() 'ascii' locale.getpreferredencoding() 'UTF-8' s = u'Русский

[issue15809] Строки из IDLE поступают в неверной кодировке.

2012-08-29 Thread Ezio Melotti
Ezio Melotti added the comment: Looks like your IDLE is set to use latin-1, but s.encode('latin1') should have failed with an UnicodeEncodeError. Are you sure you copied the snippet correctly? The default source encoding refers to the .py files you open with IDLE, and doesn't affect the