From 8e9042961588d3d1e352eb80d2f5e9e7f30bea10 Mon Sep 17 00:00:00 2001 From: Oct-autumn Date: Tue, 18 Mar 2025 10:28:25 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DEULA=E5=92=8C=E9=9A=90?= =?UTF-8?q?=E7=A7=81=E6=94=BF=E7=AD=96=E5=A4=84=E7=90=86=E6=97=B6=E5=8F=91?= =?UTF-8?q?=E7=94=9F=E7=BC=96=E7=A0=81=E4=B8=8D=E5=85=BC=E5=AE=B9=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bot.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bot.py b/bot.py index f5bfb7704..ddf1cd359 100644 --- a/bot.py +++ b/bot.py @@ -183,9 +183,9 @@ def check_eula(): # 检查EULA确认文件是否存在 if eula_confirm_file.exists(): # 检查EULA文件版本是否更新(对比哈希) - with open(eula_file, "r") as f: + with open(eula_file, "r", encoding="utf-8") as f: eula_content = f.read() - with open(eula_confirm_file, "r") as f: + with open(eula_confirm_file, "r", encoding="utf-8") as f: confirmed_content = f.read() # 计算EULA文件的md5值 eula_new_hash = hashlib.md5(eula_content.encode("utf-8")).hexdigest() @@ -197,9 +197,9 @@ def check_eula(): # 检查隐私条款确认文件是否存在 if privacy_confirm_file.exists(): # 检查隐私条款文件版本是否更新(对比哈希) - with open(privacy_file, "r") as f: + with open(privacy_file, "r", encoding="utf-8") as f: privacy_content = f.read() - with open(privacy_confirm_file, "r") as f: + with open(privacy_confirm_file, "r", encoding="utf-8") as f: confirmed_content = f.read() # 计算隐私条款文件的md5值 privacy_new_hash = hashlib.md5(privacy_content.encode("utf-8")).hexdigest()