Message 169369 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
Это из 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')
Русский текст