- add BLI_string_utf8.h for unicode functions.

- move font.c unicode functions into string_utf8.c and rename to fit with other BLI_string funcs.
This commit is contained in:
2011-10-20 09:47:05 +00:00
parent e02dfe4a79
commit 8d6a554d75
21 changed files with 234 additions and 179 deletions

View File

@@ -30,7 +30,7 @@
#include "py_capi_utils.h"
#include "BKE_font.h" /* only for utf8towchar, should replace with py funcs but too late in release now */
#include "BLI_string_utf8.h" /* only for BLI_strncpy_wchar_from_utf8, should replace with py funcs but too late in release now */
#ifdef _WIN32 /* BLI_setenv */
#include "BLI_path_util.h"
@@ -478,7 +478,7 @@ void PyC_SetHomePath(const char *py_path_bundle)
/* cant use this, on linux gives bug: #23018, TODO: try LANG="en_US.UTF-8" /usr/bin/blender, suggested 22008 */
/* mbstowcs(py_path_bundle_wchar, py_path_bundle, FILE_MAXDIR); */
utf8towchar(py_path_bundle_wchar, py_path_bundle);
BLI_strncpy_wchar_from_utf8(py_path_bundle_wchar, py_path_bundle, sizeof(py_path_bundle_wchar) / sizeof(wchar_t));
Py_SetPythonHome(py_path_bundle_wchar);
// printf("found python (wchar_t) '%ls'\n", py_path_bundle_wchar);