fix: 修复 Windows 下部署项目时可能出现的 UnicodeDecodeError

fixes: #1548
This commit is contained in:
Soulter
2025-06-11 00:25:14 +08:00
parent f56355da89
commit 7098c98dde

View File

@@ -11,7 +11,9 @@ class SQLiteDatabase(BaseDatabase):
super().__init__() super().__init__()
self.db_path = db_path self.db_path = db_path
with open(os.path.dirname(__file__) + "/sqlite_init.sql", "r") as f: with open(
os.path.dirname(__file__) + "/sqlite_init.sql", "r", encoding="utf-8"
) as f:
sql = f.read() sql = f.read()
# 初始化数据库 # 初始化数据库