From 2bfed689fe1a94b64ac61d04dc96ad4d0b03fb54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=B0=E9=98=85?= <43716063+Baiyuetribe@users.noreply.github.com> Date: Fri, 13 Sep 2024 12:14:03 +0800 Subject: [PATCH] Fix messy Chinese paths on Windows --- source/core/FileLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/FileLoader.cpp b/source/core/FileLoader.cpp index 1b183ea5e..19d05006b 100644 --- a/source/core/FileLoader.cpp +++ b/source/core/FileLoader.cpp @@ -14,7 +14,7 @@ namespace MNN { static FILE* _OpenFile(const char* file, bool read) { #if defined(_MSC_VER) wchar_t wFilename[1024]; - if (0 == MultiByteToWideChar(CP_ACP, 0, file, -1, wFilename, sizeof(wFilename))) { + if (0 == MultiByteToWideChar(CP_UTF8, 0, file, -1, wFilename, sizeof(wFilename))) { return nullptr; } #if _MSC_VER >= 1400