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 methane
Recipients methane
Date 2010-01-24.05:12:01
SpamBayes Score 1.68351e-09
Marked as misclassified No
Message-id <1264309924.17.0.144254143298.issue7768@psf.upfronthosting.co.za>
In-reply-to
Content
raw_input and input should take unicode prompt and encode with sys.stdout.encoding like print or input in py3k.

>>> u = u"あいう"
>>> print u
あいう
>>> x = raw_input(u)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-2: ordinal not in range(128)
>>> import sys
>>> sys.stdout.encoding
'cp932'
History
Date User Action Args
2010-01-24 05:12:04methanesetrecipients: + methane
2010-01-24 05:12:04methanesetmessageid: <1264309924.17.0.144254143298.issue7768@psf.upfronthosting.co.za>
2010-01-24 05:12:02methanelinkissue7768 messages
2010-01-24 05:12:01methanecreate