Felice Pollano
Felice Pollano

Reputation: 33272

Strange characters when consuming JSON web service

I'm consuming a JSON WebService by using the WebClient.DOwnloadStringAsync. The returning string contains some strange character pair:

"start_address" : "Goethestraße 7-9, Monaco di Baviera, Germania",

In place of some extended charachter. How can I see the correct one? In the example it sould be: ß

Upvotes: 1

Views: 464

Answers (2)

KingCronus
KingCronus

Reputation: 4519

That is the encoding of the German "Double S" character, still used in the word Strasse in parts of Germany. Switching to UTF8 should solve your problem.

Upvotes: 1

Felice Pollano
Felice Pollano

Reputation: 33272

Solved Myself:

WebClient client = new WebClient();
 client.Encoding = Encoding.UTF8; // Specify the encoding here

Upvotes: 3

Related Questions