Skip to content

107.0.2 Response content always encoded with Encoding.Default  #1693

Closed
@andrewkip

Description

@andrewkip

Hello!
I've mentioned that response content always encoded with Encoding.Default.

as I can see the problem is in RestSharp/src/RestSharp/Response/ResponseHandling.cs

static class ResponseHandling {
public static string GetResponseString(this HttpResponseMessage response, byte[] bytes) {

var encodingString = response.Content.Headers.ContentEncoding.FirstOrDefault();

ContentEncoding has'no info about charset

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Encoding

may be it is better to get charset info from
response.Content.Headers.ContentType.CharSet?

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