Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: UnicodeDecodeError: 'gbk' codec can't decode byte #15

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nanakura
Copy link

What type of PR is this?

fix: UnicodeDecodeError: 'gbk' codec can't decode byte

What this PR does / why we need it (en: English/zh: Chinese):

en:
zh:

Which issue(s) this PR fixes:

@FGYFFFF
Copy link

FGYFFFF commented Jun 26, 2024

可以简单说下修改的背景吗?

@nanakura
Copy link
Author

nanakura commented Jun 26, 2024

可以简单说下修改的背景吗?

py脚本中open()部分不指定encoding的话会默认以gbk读取,然后会报错,这个pr修改了py脚本中的open()部分,将open(path, "w")open(path, "r")改为了open(path, "w", encoding='utf-8')open(path, "r", encoding='utf-8')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants