Author vstinner
Recipients vstinner
Date 2010-04-14.01:16:18
SpamBayes Score 1.2236e-07
Marked as misclassified No
Message-id <1271207780.68.0.724544413479.issue8394@psf.upfronthosting.co.za>
In-reply-to
Content
The PEP 383 introduces filename using surrogates. ctypes.dlopen() support them. ctypes.cdll.LoadLibrary('libc\uDCff.so.6') 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.
History
Date User Action Args
2010-04-14 01:16:20vstinnersetrecipients: + vstinner
2010-04-14 01:16:20vstinnersetmessageid: <1271207780.68.0.724544413479.issue8394@psf.upfronthosting.co.za>
2010-04-14 01:16:19vstinnerlinkissue8394 messages
2010-04-14 01:16:18vstinnercreate