This fixes the issues seen in T74510 the root cause of this issue is BLI_strncpy_wchar_from_utf8 assuming wchar_t being 32 bits for windows where it is not (UTF16 there), so it just clips off the upper 16 bits and asserts in case that ever happened. Which naturally came to bite us in the rear with some international users.
Given most of the code in BLI_strncpy_wchar_from_utf8 was a duplicate of BLI_str_utf8_as_utf32 this patch just calls the right functions for the right platforms.
Tests pass on windows, have not tested on linux/mac