Skip to content

fix: 修复 Windows 管道 GBK 编码导致结果文件 UTF-8 解码崩溃#12

Merged
GoldenFish123321 merged 1 commit into
mainfrom
dev
Jun 5, 2026
Merged

fix: 修复 Windows 管道 GBK 编码导致结果文件 UTF-8 解码崩溃#12
GoldenFish123321 merged 1 commit into
mainfrom
dev

Conversation

@GoldenFish123321

Copy link
Copy Markdown
Owner

subprocess.Popen(text=True) 在 Windows 上默认使用系统编码(GBK)处理管道 IO, 导致 team_name 等中文字段被 GBK 编码后写入结果文件,Python 用 UTF-8 读取时崩溃。 改为显式 encoding=utf-8,与 pbb_all.cpp 全程 UTF-8 行为一致。

subprocess.Popen(text=True) 在 Windows 上默认使用系统编码(GBK)处理管道 IO,
导致 team_name 等中文字段被 GBK 编码后写入结果文件,Python 用 UTF-8 读取时崩溃。
改为显式 encoding=utf-8,与 pbb_all.cpp 全程 UTF-8 行为一致。
@GoldenFish123321 GoldenFish123321 merged commit 2874b7a into main Jun 5, 2026
2 checks passed
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