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.

Author alex.hartwig
Recipients alex.hartwig, asvetlov
Date 2012-08-29.12:41:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za>
In-reply-to
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')
Русский текст
History
Date User Action Args
2012-08-29 12:41:42alex.hartwigsetrecipients: + alex.hartwig, asvetlov
2012-08-29 12:41:42alex.hartwigsetmessageid: <1346244102.55.0.0360895602485.issue15809@psf.upfronthosting.co.za>
2012-08-29 12:41:35alex.hartwiglinkissue15809 messages
2012-08-29 12:41:35alex.hartwigcreate