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 vstinner
Recipients vstinner
Date 2010-04-14.01:16:18
SpamBayes Score 1.2236e-07
Marked as misclassified No
Message-id <>
The PEP 383 introduces filename using surrogates. ctypes.dlopen() support them. ctypes.cdll.LoadLibrary('libc\') fails with:

   UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' 
   in position 4: surrogates not allowed

Attached patch fixes this issue.

TODO: Remove the assert(PyBytes_Check(name2)). I don't know if PyUnicode_FSConverter() does always return a PyBytes object or not.
Date User Action Args
2010-04-14 01:16:20vstinnersetrecipients: + vstinner
2010-04-14 01:16:20vstinnersetmessageid: <>
2010-04-14 01:16:19vstinnerlinkissue8394 messages
2010-04-14 01:16:18vstinnercreate