Skip to content

Windows: run the executables with the UTF-8 code page - #22

Open
timoncool wants to merge 1 commit into
ServeurpersoCom:masterfrom
timoncool:windows-utf8-manifest
Open

timoncool wants to merge 1 commit into
ServeurpersoCom:masterfrom
timoncool:windows-utf8-manifest

Conversation

@timoncool

Copy link
Copy Markdown

On Windows the tools open files through the narrow APIs (fopen, CreateFileA, FindFirstFileA), which take the process's ANSI code page. A path with characters outside that code page - Chinese on a Russian or English Windows, Cyrillic on an English one - reaches them as ? and the file is not found.

This embeds an application manifest that sets the process code page to UTF-8 (activeCodePage, Windows 10 1903 and later) in every executable on MSVC, so argv and the paths built from it stay intact. Nothing changes off Windows or with other compilers.

Checked: mp3-codec -i D:\...\测试_音乐\歌曲.mp3 on a Windows with code page 1251 - before: [Audio] Cannot open D:\...\??_??\??.mp3; after: decoded and written to 新.wav.

…the system's ANSI code page reaches fopen, CreateFileA and FindFirstFileA intact
timoncool added a commit to timoncool/YuE2-Studio that referenced this pull request Oct 26, 2026
…ge, so paths outside the system's ANSI code page open (ServeurpersoCom/yue2.cpp#22); the writing assistant's model downloads through the HF-Mirror when the settings take models from it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant