Unicode字符编码



我想从 DownloadString(url);输出Unicode字符(乌克兰,白belorussian)。到这个时候,它仅输出英语和其他语言,就像符号一样。

    private void button3_Click(object sender, EventArgs e)
    {
        string method = "messages.get";
        string param = "out&count=10";
        string url = "https://api.vk.com/method/"+method+"?"+param+"&v=5.31&access_token="+myAuth.Token1+"";
        WebClient client = new WebClient();
        string json = client.DownloadString(url);
        JavaScriptSerializer json_serializer = new JavaScriptSerializer();
        RootObject response = (RootObject)json_serializer.Deserialize(json, typeof(RootObject));
        textBox2.Text = response.response.items[0].body;
    }

如何解决我的问题?

使用client.Encoding = Encoding.UTF8;

相关内容

  • 没有找到相关文章

最新更新