Skip to content

Commit

Permalink
Save file as utf-8 encoding
Browse files Browse the repository at this point in the history
Save file as utf-8 encoding
  • Loading branch information
JE-Chen committed Sep 25, 2023
1 parent d0c418b commit b1c70c7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions exe/a.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("你好")
2 changes: 1 addition & 1 deletion je_editor/utils/file/save/save_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def write_file(file_path: str, content: str) -> None:
try:
lock.acquire()
if file_path != "" and file_path is not None:
with open(file_path, "w+") as file_to_write:
with open(file_path, "w+", encoding="utf-8") as file_to_write:
file_to_write.write(content)
except JEditorSaveFileException:
raise JEditorSaveFileException
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "je_editor_dev"
version = "0.0.181"
version = "0.0.183"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down
2 changes: 1 addition & 1 deletion stable.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "je_editor"
version = "0.0.167"
version = "0.0.169"
authors = [
{ name = "JE-Chen", email = "jechenmailman@gmail.com" },
]
Expand Down

0 comments on commit b1c70c7

Please sign in to comment.