Piotr Caban (@piotr) commented about dlls/msvcrt/data.c:
- return NULL;
- MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,str,len,wstr,len);
- return wstr;
- const unsigned int len = strlen(str) + 1 ;
- wchar_t *wstr = malloc(len*sizeof (wchar_t));
- if(!wstr)
return NULL;
+#if _MSVCR_VER >= 140
- MultiByteToWideChar(___lc_codepage_func() == CP_UTF8 ? CP_UTF8 : CP_ACP,
MB_PRECOMPOSED,str,len,wstr,len);
+#else
- MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED,str,len,wstr,len);
+#endif
- return wstr;
}
`msvcrt_wstrdupa` is used in more functions. You will either need to add tests for other functions (like e.g. `_putenv`) or introduce new helper for file functions.