(转)解决c#自带的HttpClient(Http.GetFromJsonAsync Http.GetStringAsync等)返回中文乱码问题

        Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);
        var aa = await Http.GetByteArrayAsync("test.json");
        var bb= Encoding.GetEncoding("GB2312").GetString(aa);
        Console.WriteLine(bb);

转载自博客园

posted @ 2021-01-11 14:22  咬轮猫  阅读(2084)  评论(0编辑  收藏  举报
Live2D