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

[Feature] 更好的编码识别方式 #170

Closed
zonde306 opened this issue Dec 7, 2023 · 2 comments
Closed

[Feature] 更好的编码识别方式 #170

zonde306 opened this issue Dec 7, 2023 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@zonde306
Copy link

zonde306 commented Dec 7, 2023

Is your feature request related to a problem? Please describe.
如果服务器没有返回 Content-Type HTTP header 且 response.contnet 确实不是 utf-8 编码的情况下会出现 response.text 内容错误

Describe the solution you'd like
尝试从 response.contnet 获取编码

Describe alternatives you've considered
例如 w3lib 的实现:https://w3lib.readthedocs.io/en/latest/w3lib.html#w3lib.encoding.html_to_unicode

Additional context

@zonde306 zonde306 added the enhancement New feature or request label Dec 7, 2023
@perklet
Copy link
Collaborator

perklet commented Dec 8, 2023

嗯,看起来不错。

@perklet
Copy link
Collaborator

perklet commented Apr 10, 2024

Addressed by #284

@perklet perklet closed this as completed Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants