- 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

@@ -52,12 +52,12 @@
#include "BLI_path_util.h"
#include "BLI_math_base.h"
#include "BLI_string.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"
#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 */
@@ -194,7 +194,7 @@ void BPY_python_start(int argc, const char **argv)
/* not essential but nice to set our name */
static wchar_t bprogname_wchar[FILE_MAXDIR+FILE_MAXFILE]; /* python holds a reference */
utf8towchar(bprogname_wchar, bprogname);
BLI_strncpy_wchar_from_utf8(bprogname_wchar, bprogname, sizeof(bprogname_wchar) / sizeof(wchar_t));
Py_SetProgramName(bprogname_wchar);
/* must run before python initializes */