From e977f80a8fdcb6dabdff245e186e4dd47f6728c4 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 26 Jul 2010 04:21:44 +0000 Subject: [PATCH] bugfix [#23018] Can't run 2.53 build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for some reason mbstowcs() was converting '/home/matrem/Téléchargements/' to '/home/matrem/T', where blenders utf8towchar() worked correctly, tried changing my locale but didnt help so using blenders utf8towchar() function. --- source/blender/python/intern/bpy_interface.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index bf91b0498ed..d01eaa56d34 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -44,6 +44,7 @@ #include "BKE_context.h" #include "BKE_text.h" +#include "BKE_font.h" /* only for utf8towchar */ #include "BKE_main.h" #include "BKE_global.h" /* only for script checking */ @@ -204,10 +205,13 @@ void BPY_start_python_path(void) #endif { - static wchar_t py_path_bundle_wchar[FILE_MAXDIR]; + static wchar_t py_path_bundle_wchar[FILE_MAX]; + + /* mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); */ /* cant use this, on linux gives bug: #23018 */ + utf8towchar(py_path_bundle_wchar, py_path_bundle); - mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); Py_SetPythonHome(py_path_bundle_wchar); + // printf("found python (wchar_t) '%ls'\n", py_path_bundle_wchar); } }