Closed
Description
Bug report
This bug was encountered when working through gh-106816, specifically this comment chain.
_winapi.LCMapStringEx()
raises the error ValueError: embedded null character
when passed a string containing a null character.
This can be reproduced by running the following:
import _winapi
_winapi.LCMapStringEx('abc\x00def')
From the discussion in the linked PR it looks like the LCMapStringEx
implementaion in 3.11 has already been improved to handle null characters and so maybe the same change can be brought forward into the 3.12 and 3.13 implementations?
Your environment
- CPython versions tested on: 3.13.0a0
- Operating system and architecture: Windows 11 on amd64