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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user