[PR #3092] [CLOSED] fix: strata_bench crashed reading CMakeLists.txt on GBK-default Windows #4449

Closed
opened 2026-11-07 15:35:59 +07:00 by bsakaguchi · 0 comments
Owner

📋 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)

  • 6d0db7b fix: 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() in tools/strata_bench.py read CMakeLists.txt with the system default encoding. On a Chinese Windows 11 install the default code page is GBK, so the UTF-8 BOM in CMakeLists.txt raised UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2 and the bench exited (code 1) before the suite even started. It now reads with encoding="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.py against 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.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/3092 **Author:** [@gg320324492-lgtm](https://github.com/gg320324492-lgtm) **Created:** 10/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix-bench-encoding` --- ### 📝 Commits (1) - [`6d0db7b`](https://github.com/Niko1221/Strata/commit/6d0db7ba0de5d630d687f5ff58e8d93945010250) fix: 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) <details> <summary>View changed files</summary> 📝 `tools/strata_bench.py` (+1 -1) </details> ### 📄 Description ## What it changes One line: `project_version()` in `tools/strata_bench.py` read `CMakeLists.txt` with the system default encoding. On a Chinese Windows 11 install the default code page is GBK, so the UTF-8 BOM in `CMakeLists.txt` raised `UnicodeDecodeError: 'gbk' codec can't decode byte 0xbf in position 2` and the bench exited (code 1) before the suite even started. It now reads with `encoding="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.py` against 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](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 15:35:59 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#4449
No description provided.