function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
fer_farfer_far 

Accents and portuguese characters in HttpResponse

Hello community,

 

I've got a problem when making an HttpRequest to an URL that returns an XML response:

 

 

        HttpRequest req = new HttpRequest();
        req.setEndpoint(url);
        req.setMethod('GET');

        HttpResponse res = h.send(req);

The problem is all accented or portuguese characters come as "?", so I can't process the XML correctly.

 

The XML encoding is ISO-8859-1. I tried to set Accept-charset header with no luck. The URL to call is http://www.ctt.pt/pdcp/xml_pdcp?incodpos=2000000 and calling that from a browser the response is shown correctly.

 

Can anybody help me out please?

 

Kind regards.

 

sforce2009sforce2009

Try installing microsoft Multi language service pack. We have faced some sort of problems with accent characters, but when I installed that, They were automatically gone.

 

Thanks

fer_farfer_far

Thanks for your reply.

 

But I cannot install it since my OS is Windows 7 Professional and it seems Multilingual User Interface language pack can only be installed on Ultimate and Enterprise versions.

 

Regards.