Link to home
Start Free TrialLog in
Avatar of mromeo
mromeo

asked on

How do you encode and send special characters via HTTP in XML?


I have an XML file that I am sending to another server via HTTP.  I am using MFC's CHttpFile object and Xerces XML to do this.  I have some extended characters (from Spanish language) that I may need to put in the XML. When I do this and try to send it via HTTP, the XML parser on the other end has a problem parsing this XML because of the special characters.  I know I need to indicate to the XML to use utf-8, but I'm not sure how to do this.  Do I encode it in the HTTP header or in the XML?  If so, do I use the Xerces APIs or a function on the CHttpFile class?  Thanks.

ASKER CERTIFIED SOLUTION
Avatar of vinodhsomasekharan
vinodhsomasekharan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial