mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 21:05:40 +07:00
[PR #3092] [CLOSED] fix: strata_bench crashed reading CMakeLists.txt on GBK-default Windows #4449
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4449
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3092
Author: @gg320324492-lgtm
Created: 10/18/2026
Status: ❌ Closed
Base:
main← Head:fix-bench-encoding📝 Commits (1)
6d0db7bfix: strata_bench version probe read CMakeLists.txt in the system default encoding, which threw UnicodeDecodeError on UTF-8 BOM on GBK-default Windows (line 564, before the suite even started); read it as utf-8-sig📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
tools/strata_bench.py(+1 -1)📄 Description
What it changes
One line:
project_version()intools/strata_bench.pyreadCMakeLists.txtwith the system default encoding. On a Chinese Windows 11 install the default code page is GBK, so the UTF-8 BOM inCMakeLists.txtraisedUnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2and the bench exited (code 1) before the suite even started. It now reads withencoding="utf-8-sig", errors="replace".What it leaves alone
Nothing else. The rest of the file's reads already declare encodings (
utf-8/utf-8-sig); this was the only one that did not.How I checked
On an RTX 5090 / Windows 11 (GBK default) box: running
python tools/strata_bench.pyagainst a live server failed with the decode error before the change, and completed the whole suite (chat, 4K, 16K, agent) after it.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.