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

Incorrect windows-1251 handling #54

@zuev-stepan

Description

@zuev-stepan

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions