How to get json result with Unicode character

How can I get unicode values ​​from json in my encoding.

string url = "https://www.googleapis.com/books/v1/volumes?q=isbn:9789753425988";
WebClient wc = new WebClient();
string GoogleBook = (wc.DownloadString(url));
GoogleBook = GoogleBook.Replace("\n", string.Empty);
GoogleBookRespons book = JsonConvert.DeserializeObject<GoogleBookRespons>(GoogleBook);
List<BookSearchResult> Results = new List<BookSearchResult>();

public class GoogleBookRespons
{
    public string kind { get; set; }
    public int totalItems { get; set; }
    public List<Item> items { get; set; }

}

public class BookSearchResult
{
    public string ISBN { get; set; }
    public string Title { get; set; }
    public List<string> Author { get; set; }
    public string Published { get; set; }
    public string Imagelink { get; set; }
    public string Image { get; set; }
}

      

Shown result: Yüzüklerin Efendisi 1 Yüzük

But I would like to show it as: Yüzüklerin Efendisi Yüzük

+3


source to share


1 answer


Set the encoding property of WebClient to UTF-8 e.g .:

wc.Encoding = System.Text.Encoding.UTF8;

      



and it should work.

+2


source







All Articles