Hirokazu Yamamoto <ocean-c...@m2.ccsnet.ne.jp> added the comment: This happens because RegQueryInfoKeyA returns maximum value name length not in *Ansi* characters but in *Unicode" characters. I don't know clue why.
http://msdn.microsoft.com/en-us/library/ms724902%28VS.85%29.aspx In multibyte environment, 2 or 3 bytes characters are mapped to one size unicode. So usually, the length of *Ansi* characters are larger than or equals to the length of *Unicode* characters. If every Ansi characters are mapped to one size Unicode, lengthes are equal, so probably this issue won't happen. I'll attach the patch to fix this issue. But be care, this is not tested so densely. At least, the script to reproduce this issue ran fine. ---------- keywords: +patch Added file: http://bugs.python.org/file18999/py27_winreg_EnumValue.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9937> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com