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'Русский текст' >>> print s.encode('utf_8') Ð ÑÑÑкий ÑекÑÑ >>> print s.encode('latin1') Русский текст
Это из консоли: >>> import sys >>> import locale >>> sys.getdefaultencoding() 'ascii' >>> locale.getpreferredencoding() 'UTF-8' >>> s = u'Русский текст' >>> print s.encode('utf_8') Русский текст ---------- components: IDLE files: Снимок-2012-08-21 10:37:23.png messages: 169369 nosy: alex.hartwig, asvetlov priority: normal severity: normal status: open title: Строки из IDLE поступают в неверной кодировке. type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file27044/Снимок-2012-08-21 10:37:23.png _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15809> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com