Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-05 12:20:18 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-05 12:20:18 +0300
commit260687d9b1fbb5d806631de95dff2ccd57399d40 (patch)
treec421cdf3337f9ff7302f05efd56191d5396a9534 /source/blender/python
parentd30cd92014f7cf38440e5fe18c21da74c3e3c2dd (diff)
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.
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/generic/py_capi_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c
index 8726f416992..8dfc1ec72b4 100644
--- a/source/blender/python/generic/py_capi_utils.c
+++ b/source/blender/python/generic/py_capi_utils.c
@@ -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;
}
}