diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-10-24 12:45:55 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-10-24 12:45:55 +0400 |
commit | 70bf00a74c1688e857e3ca1b143b4d7a57a30655 (patch) | |
tree | 8015eb2525a1aeca9c77fcbdf8fe222fff67948d /source/blender/python/intern/bpy_interface.c | |
parent | dbe2fe5043b99f8a5717bbe5b6a9e36a6519f8c7 (diff) | |
parent | f1cea89d99f0c80bdccd2ba1359142b5ff14cdb9 (diff) |
svn merge ^/trunk/blender -r41200:41226 .
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index cfd8d9f433b..a96b8209d91 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -203,6 +203,13 @@ void BPY_python_start(int argc, const char **argv) /* allow to use our own included python */ PyC_SetHomePath(BLI_get_folder(BLENDER_SYSTEM_PYTHON, NULL)); + /* without this the sys.stdout may be set to 'ascii' + * (it is on my system at least), where printing unicode values will raise + * an error, this is highly annoying, another stumbling block for devs, + * so use a more relaxed error handler and enforce utf-8 since the rest of + * blender is utf-8 too - campbell */ + BLI_setenv("PYTHONIOENCODING", "utf-8:surrogateescape"); + /* Python 3.2 now looks for '2.xx/python/include/python3.2d/pyconfig.h' to * parse from the 'sysconfig' module which is used by 'site', * so for now disable site. alternatively we could copy the file. */ |