Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
exporting utf-8 csv files
  • Loading branch information
Sci-Twi authored Oct 31, 2025
commit 7c7c33c7182badb0e8029932cfc063665f9c41f4
4 changes: 2 additions & 2 deletions 4 common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,11 +248,11 @@ def save_to_file(path, data):
:return: 保存成功与否
"""
try:
with open(path, 'w', errors='ignore', newline='') as file:
with open(path, 'w', errors='ignore', newline='', encoding='utf-8') as file:
file.write(data)
return True
except TypeError:
with open(path, 'wb') as file:
with open(path, 'wb', encoding='utf-8') as file:
file.write(data)
return True
except Exception as e:
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.