fix: 解决unicode字符报错
This commit is contained in:
parent
17245a9bcf
commit
b99334ed12
@ -4,7 +4,7 @@ import sys
|
||||
|
||||
def read_file_content(file_path: str) -> str:
|
||||
try:
|
||||
with open(file_path, "r", encoding="utf-8") as file:
|
||||
with open(file_path, "r", encoding="utf-8", errors="ignore") as file:
|
||||
return file.read()
|
||||
except FileNotFoundError:
|
||||
print("Error: File not found.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user