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 philyoon
Recipients philyoon
Date 2007-09-04.02:21:39
SpamBayes Score 0.0020208294
Marked as misclassified No
Message-id <1188872501.42.0.387468131145.issue1097@psf.upfronthosting.co.za>
In-reply-to
Content
Currently in interactive mode, when you try to input non-ascii
characters using input() builtin function, you get UnicodeDecodeError.

>>> print(input())
윤상필
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
UnicodeDecodeError: 'utf8' codec can't decode bytes in position 0-1:
illegal encoding

The error says that input() function is trying to decode the byte string
using the utf8 codec, when sys.stdin.encoding is not 'utf8'.

>>> import sys; print(sys.stdin.encoding)
cp949

In non-interactive mode, input() works just fine.
History
Date User Action Args
2007-09-04 02:21:42philyoonsetspambayes_score: 0.00202083 -> 0.0020208294
recipients: + philyoon
2007-09-04 02:21:41philyoonsetspambayes_score: 0.00202083 -> 0.00202083
messageid: <1188872501.42.0.387468131145.issue1097@psf.upfronthosting.co.za>
2007-09-04 02:21:41philyoonlinkissue1097 messages
2007-09-04 02:21:40philyooncreate