Fix T71273: Bad encoding of utf-8 for Text objects

`BLI_strncpy_wchar_from_utf8` internally assumes `wchar_t` is 32 bits
which is not the case on windows.

The solution is to replace `wchar_t` with `char32_t`.

Thanks to @robbott for compatibility on macOS.

Differential Revision: https://developer.blender.org/D6198
This commit is contained in:
2019-11-22 12:26:54 -03:00
parent 1304cee920
commit 177dfc6384
16 changed files with 198 additions and 90 deletions

View File

@@ -491,7 +491,7 @@ static void make_duplis_font(const DupliContext *ctx)
float vec[3], obmat[4][4], pmat[4][4], fsize, xof, yof;
int text_len, a;
size_t family_len;
const wchar_t *text = NULL;
const char32_t *text = NULL;
bool text_free = false;
/* font dupliverts not supported inside collections */