🐛 优化版本文件读取编码

- 在读取版本文件时指定 UTF-8 编码,确保兼容性
This commit is contained in:
molanp 2025-05-09 18:01:41 +08:00
parent e291040859
commit bec16e87c9

View File

@ -92,7 +92,7 @@ class ApiDataSource:
"""
version_file = Path() / "__version__"
if version_file.exists():
if text := version_file.open().read():
if text := version_file.open(encoding="utf-8").read():
return text.replace("__version__: ", "").strip()
return "unknown"