How do I handle message with special characters

1

I am consuming a REST service that is returning the following message with special characters:

"Animated T & amp; Spaces"

Is it possible to handle this message?

    
asked by anonymous 11.04.2018 / 00:11

1 answer

0

You can work with Encoding, make sure it solves your problem:

var buffer = await response.Content.ReadAsBufferAsync();
var byteArray = buffer.ToArray();
var responseString = Encoding.UTF8.GetString(byteArray, 0, byteArray.Length);
    
11.04.2018 / 09:05