]> Devoid-pointer.net GitWeb - libHPCS.git/commitdiff
Expect the file path to method data file to be in UTF-8 on Win32
authorMichal Malý <madcatxster@devoid-pointer.net>
Tue, 8 Dec 2015 20:41:03 +0000 (21:41 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Tue, 8 Dec 2015 20:41:03 +0000 (21:41 +0100)
libhpcs.c

index a48e11859697dea87e69ea760c0ec487ece168a3..2a8eab4b2505999df3dda0afc0e009bb6d46c4f1 100644 (file)
--- a/libhpcs.c
+++ b/libhpcs.c
@@ -1084,7 +1084,7 @@ static FILE* __win32_open_data_file(const char* filename)
        int w_size;
 
        /* Get the required size */
-       w_size = MultiByteToWideChar(CP_ACP, MB_PRECOMPOSED, filename, -1, NULL, 0);
+       w_size = MultiByteToWideChar(CP_UTF8, MB_PRECOMPOSED, filename, -1, NULL, 0);
        if (w_size == 0) {
                PR_DEBUGF("Count MultiByteToWideChar() error: %x\n", GetLastError());
                return NULL;