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

alex hartwig report at bugs.python.org
Wed Aug 29 14:41:42 CEST 2012


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 <report at bugs.python.org>
<http://bugs.python.org/issue15809>
_______________________________________


More information about the Python-bugs-list mailing list