Message58965
While testing the 3.0a2 build (on Win XPh SP2, Czech), I found a
possible bug in the input() function;
if the prompt text contains non-ascii characters (even those present in
the default charset of the system locale - Czech in this case) the
prompt is displayed incorrectly; however, the inserted value is treated
as expected.
The print() function deals with these characters correctly.
This bug occurs in the system console (cmd.exe) only, using idle
everything works ok.
============ a minimal snapshot of the session follows ==========
Python 3.0a2 (r30a2:59397:59399, Dec 6 2007, 22:34:52) [MSC v.1500 32
bit (Inte
l)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> input("ěšč: ")
─Ť┼í─Ź: 7
'7'
>>> print("ěšč: ")
ěšč:
>>>
==================================
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> input(u"ěšč: ")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-
2: ordin
al not in range(128)
>>> print u"ěšč: "
ěšč:
>>> |
|
Date |
User |
Action |
Args |
2007-12-22 21:09:33 | vbr | set | spambayes_score: 0.00789578 -> 0.007895782 recipients:
+ vbr |
2007-12-22 21:09:33 | vbr | set | spambayes_score: 0.00789578 -> 0.00789578 messageid: <1198357772.97.0.682407228029.issue1688@psf.upfronthosting.co.za> |
2007-12-22 21:09:32 | vbr | link | issue1688 messages |
2007-12-22 21:09:31 | vbr | create | |
|