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

Enable UTF-8 mode for python (PEP 686) #92

Closed
F-park opened this issue Jan 19, 2024 · 3 comments
Closed

Enable UTF-8 mode for python (PEP 686) #92

F-park opened this issue Jan 19, 2024 · 3 comments

Comments

@F-park
Copy link
Contributor

F-park commented Jan 19, 2024

Description

After pdm dev, UnicodeDecodeError(gbk: illegal multibyte sequence) caused by string ——

the string is in Python-Type-Challenges/challenges/intermediate-self/hints.md


Also, the emoji cannot load successfully
ba39653952033119fc57dcda2a265726

Solution

Python UTF-8 mode

@100gle
Copy link
Contributor

100gle commented Jan 19, 2024

🤔 很奇怪,我现在 Chrome 里打开已经部署在 zeabur 的版本似乎没有发现这个问题,在 mac 上运行启动命令时好像也没有见 UnicodeDecodeError 这个错误,你这个错误是在 Windows 上运行或IDE自动修改编码而导致的吗?

@laike9m
Copy link
Owner

laike9m commented Jan 19, 2024

See if it fixes the problem.

Could be that Windows is using GBK (or something else) as the default encoding.

@F-park
Copy link
Contributor Author

F-park commented Jan 19, 2024

🤔 很奇怪,我现在 Chrome 里打开已经部署在 zeabur 的版本似乎没有发现这个问题,在 mac 上运行启动命令时好像也没有见 UnicodeDecodeError 这个错误,你这个错误是在 Windows 上运行或IDE自动修改编码而导致的吗?

参考语言区域编码格式,不同系统会有不一样的行为。

我是 Windows 上运行的,没改过 IDE 或编码,通过 scoop 下载的 python。

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 a pull request may close this issue.

3 participants