I am using Delphi 7 and SecureBridge V9.5 - Standard
When I open the URL directly in Firefox I get a correct XML file
<?xml version="1.0" encoding="ISO-8859-1"?>
<liste>
<libelle>Chpt France par équipes féminin</libelle>
</liste>
The wording is in French with 2 accented characters (char 233)
In Delphi I cannot find these 2 characters which are replaced by "?"
<? xml version = "1.0" encoding = "ISO-8859-1"?>
<list>
<libelle>Chpt France par ?quipes f?minin</libelle>
</list>
I have tried several encodings but nothing helps.
Code: Select all
url := 'https://apiv2.fftt.com/mobile/pxml/xml_epreuve.php?organisme=1&type=E&......';
ScHttpWebRequest1: = TScHttpWebRequest.Create (url);
try
Response: = ScHttpWebRequest1.GetResponse;
ResponseStr: = (Response.ReadAsString);
if IsXMLWellFormed (ResponseStr) then
begin
XMLDocument1.Active: = false;
XMLDocument1.XML.Text: = ResponseStr;
XMLDocument1.Active: = true;
XMLDocument1.SaveToFile ('Atexte.xml');
XMLDocument1.Active: = false;
end;
finally
ScHttpWebRequest1.Free;
end;
response.ContentEncoding is empty
response.Headers.ToString ends with
- content-type: application / xml
- charset: ISO-8859-1
Can you help me find a solution to this problem?
Thank you
automatic translation with translate.google