From 29b77522caa727804901041b56f146ec93300bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=B9=81=E6=98=9F=5F=E9=80=90=E6=A2=A6?= Date: Sat, 11 Apr 2026 13:39:43 +0800 Subject: [PATCH] Enforce UTF-8 cache writes (#737) --- sgpt/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgpt/cache.py b/sgpt/cache.py index 5d63db8..c176fe2 100644 --- a/sgpt/cache.py +++ b/sgpt/cache.py @@ -38,7 +38,7 @@ class Cache: result += i yield i if "@FunctionCall" not in result: - file.write_text(result) + file.write_text(result, encoding="utf-8") self._delete_oldest_files(self.length) # type: ignore return wrapper