[issue5410] msvcrt bytes cleanup

STINNER Victor report at bugs.python.org
Sun Apr 5 02:39:58 CEST 2009


STINNER Victor <victor.stinner at haypocalc.com> added the comment:

> There seems to be a problem with ungetwch()

I tested Visual C++ Express 2008 and it looks like _ungetwch() only 
keep 8 lower bits (like _ungetwch(x & 255)). But it's a bug in 
Microsoft library, not in Python code (I added some printf to be 
sure).

My patch (msvcrt_wchar.patch) makes the situation better, but it's not 
perfect because of a bug in Microsoft's library.

msvcrt.getwch() works correctly with characters with code > 255 (eg. 
euro sign, U+20ac, 8364 in decimal).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5410>
_______________________________________


More information about the Python-bugs-list mailing list