外观
Windows 中文乱码
Windows 终端、批处理和配置文件的编码不同,可能导致中文输出或路径显示异常。
PowerShell
powershell
[Console]::InputEncoding = [Text.UTF8Encoding]::new()
[Console]::OutputEncoding = [Text.UTF8Encoding]::new()
$OutputEncoding = [Text.UTF8Encoding]::new()CMD
bat
chcp 65001配置文件
使用支持 UTF-8 的编辑器保存 %USERPROFILE%\.codex\config.toml。不要把 TOML 保存为 UTF-16,也不要使用全角引号替换 ASCII 双引号。
仍然乱码
- 在 Windows Terminal 中新建 PowerShell 会话。
- 检查终端字体是否包含中文字符。
- 运行
codex --version排除脚本本身错误。 - 用控制台重新下载最新一键脚本。
乱码只影响显示时不要贸然重建账户或轮换密钥;先确认 API 请求是否实际失败。