Skip to content

Commit 83ee6fa

Browse files
committed
Add UTF-8 encoding to file opening in from_file method
1 parent f00006c commit 83ee6fa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/open_data_contract_standard/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def to_yaml(self) -> str:
205205
def from_file(cls, file_path: str) -> "OpenDataContractStandard":
206206
if not os.path.exists(file_path):
207207
raise FileNotFoundError(f"The file '{file_path}' does not exist.")
208-
with open(file_path, "r") as file:
208+
with open(file_path, "r", encoding="utf-8") as file:
209209
file_content = file.read()
210210
return cls.from_string(file_content)
211211

0 commit comments

Comments
 (0)