Skip to content

fix(bat): resolve start.bat flash-close on Chinese Windows (#3)#4

Open
heyuqiu2023 wants to merge 1 commit intomainfrom
fix/bat-encoding-issue-3
Open

fix(bat): resolve start.bat flash-close on Chinese Windows (#3)#4
heyuqiu2023 wants to merge 1 commit intomainfrom
fix/bat-encoding-issue-3

Conversation

@heyuqiu2023
Copy link
Copy Markdown
Owner

Root cause: .bat files were UTF-8 without BOM + LF line endings. Chinese Windows cmd.exe reads .bat files as GBK (CP936) by default, where UTF-8 multibyte leads (0xE2-0xE9) are valid GBK lead bytes that consume the following byte, breaking labels like ':no_node' into 'Ino_node' and causing goto failures + window flash-close.

Fixes: Add UTF-8 BOM so Win10+ cmd.exe reads files as UTF-8; move 'chcp 65001 >nul 2>&1' right after '@echo off' in all three files; convert LF line endings to CRLF.

Closes #3

Root cause: .bat files were UTF-8 without BOM + LF line endings. Chinese Windows cmd.exe reads .bat files as GBK (CP936) by default, where UTF-8 multibyte leads (0xE2-0xE9) are valid GBK lead bytes that consume the following byte, breaking labels like ':no_node' into 'Ino_node' and causing goto failures + window flash-close.

Fixes: Add UTF-8 BOM so Win10+ cmd.exe reads files as UTF-8; move 'chcp 65001 >nul 2>&1' right after '@echo off' in all three files; convert LF line endings to CRLF.

Closes #3
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.

windows电脑无法运行start.bat,出现闪退

1 participant