Skip to content
Shihao Qi
Projects
Writing
Notes
Search
About
中
TAG
Windows
Everything filed under this tag.
1 entries
01
Notes
Non-ASCII text and parentheses in Windows batch files: commands cut into fragments after chcp 65001, and a ) inside echo closes the if block early
2026-10-27
When cmd reads a batch file containing multibyte characters, later lines can be read from a shifted position, producing “is not recognized” errors with half a command name; chcp 65001, UTF-8 with BOM and GBK all drifted, and only pure ASCII was stable. Autarkia hit this three times, because the checker covered one directory and wasn’t in CI.
#Windows
#Batch Files
#Debugging
← All tags
Search the site