New submission from Campbell Barton <ideasma...@gmail.com>: On linux I have a path which python reads as...
/data/test/num\udce9ro_bad/untitled.blend os.listdir("/data/test/") returns this ['num\udce9ro_bad'] But the same path cant be given to the C api's Py_CompileString Where fn is '/data/test/num\udce9ro_bad/untitled.blend/test.py' Py_CompileString(buf, fn, Py_file_input); ...gives this error. UnicodeDecodeError: 'utf8' codec can't decode bytes in position 14-16: invalid data >From this pep, non decode-able paths should use surrogateescape's http://www.python.org/dev/peps/pep-0383/ ---------- components: None messages: 115202 nosy: ideasman42 priority: normal severity: normal status: open title: Py_CompileString fails on non decode-able paths. type: behavior versions: Python 3.1 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9713> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com