With the following code, I get a string from a stream but I don't know the encoding type because it's detected automatically by StreamReader;
how can I get the encoding type of the string respHTML?
Dim reader As StreamReader = New StreamReader(respStream, True)
Dim respHTML as String = reader.ReadToEnd()
Strings contain Unicode characters, not bytes.
Encodings are ways to save Unicode characters as bytes; a string doesn't have any encoding.
You can get the encoding used by the StreamReader by checking the CurrentEncoding
property.