diff --git a/UnigeWebUtility/HttpWebUtility.cs b/UnigeWebUtility/HttpWebUtility.cs index 9683620..fc077b7 100644 --- a/UnigeWebUtility/HttpWebUtility.cs +++ b/UnigeWebUtility/HttpWebUtility.cs @@ -35,8 +35,11 @@ public static string GetContent(this HttpWebResponse response) { // Get the response stream using Stream stream = response.GetResponseStream(); + // Get the encoding from the response + var encoding = Encoding.GetEncoding(response.CharacterSet); + // Convert the stream to a stream reader - using StreamReader reader = new(stream); + using StreamReader reader = new(stream, encoding); return reader.ReadToEnd();