hash(unicode(string)) == hash(string) sometimes

Martin von Loewis loewis at informatik.hu-berlin.de
Thu Mar 7 10:00:08 EST 2002


Skip Montanaro <skip at pobox.com> writes:

> Veering off on a tangent, the question of raw_input failing for
> latin-1 input came up on python-help in the last day.  The suggested
> solution was to change the system default encoding.  If not that,
> then what?

Depends on what the problem is. In a terminal, raw_input() works fine
for me. In IDLE, I'd say there is a bug somewhere. I'm not sure what
it is: either raw_input should be allowed to return Unicode strings
(which I'd like more), or IDLE should convert to the 'terminal
encoding' which, on Windows, should be "mbcs".

If there is a bug, it is ok to work around it with any means you find.
It would be better to report it to SF, though.

Regards,
Martin



More information about the Python-list mailing list