Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

Incorrect windows-1251 handling #54

Open
zuev-stepan opened this issue Jul 21, 2022 · 0 comments
Open

Incorrect windows-1251 handling #54

zuev-stepan opened this issue Jul 21, 2022 · 0 comments

Comments

@zuev-stepan
Copy link

Sites encoded with windows-1251 are not rendered correctly.

Expected Behavior

Site should look just like it does without proxy.

Current Behavior

Non-ascii characters are replaced with mess (пїЅпїЅпїЅ).

Possible Solution

Instead of taking response.text(), you should decode it considering charset from headers and also update headers accordingly.

Steps to Reproduce

open rutracker.org

Context (Environment)

Detailed Description

Possible Implementation

I made a simple fix which works for rutracker, but you probably have to implement a better solution to work everywhere
(zuev-stepan/Ultraviolet-Static@551b538)

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

No branches or pull requests

1 participant