This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author stutzbach
Recipients stutzbach
Date 2008-05-10.17:37:22
SpamBayes Score 0.0030156407
Marked as misclassified No
Message-id <>
_winreg.EnumValue raises a WindowsError ("More data is available") if
the registry data includes multibyte unicode characters.

Inspecting PyEnumValue in _winreg.c, I believe I see the problem.  The
function uses RegQueryInfoKey to determine the maximum data and key name
sizes to pass to RegEnumValue.

Unfortunately, RegQueryInfoKey returns the size in number of unicode
characters, while RegEnumValue expects a size in bytes.  This is OK if
all the values are ASCII, but it fails if there are any multibyte
unicode characters.

I believe it would be sufficient to multiply the sizes by 4, since
that's the maximum width of a unicode character.

The bug exists in at least Python 2.5 and Python 3.0 (based on source
code inspection).



Date User Action Args
2008-05-10 17:37:35stutzbachsetspambayes_score: 0.00301564 -> 0.0030156407
recipients: + stutzbach
2008-05-10 17:37:34stutzbachsetspambayes_score: 0.00301564 -> 0.00301564
messageid: <>
2008-05-10 17:37:32stutzbachlinkissue2810 messages
2008-05-10 17:37:31stutzbachcreate