Message115202
| Author |
ideasman42 |
| Recipients |
ideasman42 |
| Date |
2010年08月30日.07:46:51 |
| SpamBayes Score |
6.7513397e-06 |
| Marked as misclassified |
No |
| Message-id |
<1283154413.35.0.877915229941.issue9713@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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/ |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2010年08月30日 07:46:53 | ideasman42 | set | recipients:
+ ideasman42 |
| 2010年08月30日 07:46:53 | ideasman42 | set | messageid: <1283154413.35.0.877915229941.issue9713@psf.upfronthosting.co.za> |
| 2010年08月30日 07:46:51 | ideasman42 | link | issue9713 messages |
| 2010年08月30日 07:46:51 | ideasman42 | create |
|