New submission from Florian Bruhin: When using getpass.getpass() on Windows and typing a tilde (~) with a layout with dead keys (e.g. Swiss German), one would typically type "~ " to get a single tilde.
However, this returns '\x00\x83~' with getpass. It seems this is what msvcrt.getch() returns. Microsofts documentation at http://msdn.microsoft.com/en-us/library/aa297934(v=vs.60).aspx only says "When reading a function key or an arrow key, _getch and _getche must be called twice; the first call returns 0 or 0xE0, and the second call returns the actual key code." which doesn't really apply to this. It seems to work fine with other dead keys like ` or ^. Unless someone knows more about what's happening here I'd suggest replacing '\x00\x83~' by '~' in getpass. ---------- components: Library (Lib) messages: 230954 nosy: The Compiler, steve.dower, tim.golden, zach.ware priority: normal severity: normal status: open title: getpass returns garbage when typing tilde on Windows with deadkeys type: behavior versions: Python 2.7, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22837> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com