TScHttpWebResponse (accented characters)

TScHttpWebResponse (accented characters)

Method ScHttpWebRequest1.GetResponse.ReadAsString expects response to have a UTF-8 encoding, and decodes them as UTF-8. 

You may get response content "as-is" by using



You may apply encoding as follow: 

uses ...CLRClasses 
... 
var 
  Buf: TBytes; 
  Str: string; 
... 
  buf := ScHttpWebRequest1.GetResponse.ReadAsBytes; 
  Str := Encoding.GetEncoding(28591).GetString(Buf, 0, Length(Buf)); 
... 
Where 28591 is an ISO 8859-1 CodePage identifier as described here