use PyUnicode_DecodeFSDefault rather then PyUnicode_DecodeUTF8(str, strlen(str), "surrogateescape"), for converting non utf8 names.

this is needed because some UTF8 names didnt resolve on windows when using surrogateescape'd strings.

This meant you couldn't export to models some directories on windows.
This commit is contained in:
2010-12-05 09:20:18 +00:00
parent d30cd92014
commit 260687d9b1

View File

@@ -265,7 +265,8 @@ PyObject *PyC_UnicodeFromByte(const char *str)
}
else {
PyErr_Clear();
result= PyUnicode_DecodeUTF8(str, strlen(str), "surrogateescape");
/* this means paths will always be accessible once converted, on all OS's */
result= PyUnicode_DecodeFSDefault(str);
return result;
}
}