git_status failed in Chinese folder name
Description
git_status tool Chinese path encoding is wrong
Steps to reproduce
Expected behavior
Actual behavior
Impact
Environment
- OS:
- DeepSeek CLI version:
- Install method:
- Model/provider:
- Terminal app:
- Shell:
Logs, screenshots, or recordings
git status不能显示中文 · 原因在默认设置下,中文文件名在工作区状态输出,中文名不能正确显示,而是显示为八进制的字符编码。
解决 git status 中文文件名乱码如果含有中文的文件名显示为类似 \230\226\214\274.txt 的八进制字符,请在终端执行以下命令:
git config --global core.quotepath false
这行命令能禁用路径名中的特殊字符转义,直接显示真实的中文文件名。
The git status command fails to display Chinese characters because, by default, Chinese filenames are displayed as octal characters in the working directory output.
To resolve this issue, if filenames containing Chinese characters are displayed as octal characters like \230\226\214\274.txt, execute the following command in your terminal:
git config --global core.quotepath false
This command disables the escaping of special characters in pathnames, directly displaying the actual Chinese filenames.
https://gist.github.com/nightire/5069597
@Hmbown I tested on Chinese Windows 11 and confirmed the root cause is git's core.quotepath=true default — which escapes non-ASCII chars as octal.
A proper fix would be either:
- Pass
-c core.quotepath=falseto git invocations in thegit_statuscommand - Or decode octal sequences in Rust when parsing porcelain output
If you need someone to test a fix on a Chinese Windows environment, happy to help — I also noticed this repo doesn't have an i18n or l10n label yet for Chinese-related issues.
Confirmed fixed on main by #1953 (8c2235da0). git_status now invokes git with -c core.quotepath=false, and the regression test git_status_reports_unquoted_unicode_paths covers filenames like 中文路径.txt even when repo config has core.quotepath=true.
中文说明:#1953 已在 main 合并,git_status 会强制关闭 quotepath 转义,并有中文路径回归测试覆盖。关闭此问题。