[Expat-discuss] Encoding Issues + Writing XML

Josh Martin Josh.Martin@abq.sc.philips.com
Wed Jul 24 14:58:06 2002


Please correct me if I'm wrong, but you might be able to turn that off by 
passing XML_PARAM_ENTITY_PARSING_NEVER to the XML_SetParamEntityParsing() 
function.  But then again, it's been about a year since I've done anything with 
XML, and the &#nnn type entity probably isn't considered a parameter entity.

 - Josh Martin
 
> My application was using the Xerces parser earlier to parse xml files. I use
> XML to serialise my application data.
> My XML files have the following encoding:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> When i store XML files, i handle the following characters and convert them
> to their numerical entities and write them to the file.
> Invalid characters in XML : '>,<&"
> 
> When i encountered some characters like the Euro sign,the trademark symbol,
> etc...i found that these were not viewed correctly in IE 6.0
> So i converted them to their numerical entities and stored them in the XML
> file. These characters were parsed correctly by the Xerces parser on loading
> the file.
> 
> I want to switch to the expat parser and use the SAX API provided by the SAX
> in Cpp wrapper written by Jez <http://www.jezuk.co.uk/cgi-bin/view/SAX/code>
> 
> But on testing with it, i found that the numerical entities were converted
> into the characters they represented. 
> For egs. The Euro sign with the numerical entity &#8364;	
> 
> Is this because of any encoding problem. How can i solve this? I want my
> application to serialise the data in XML and i want it to be loaded the same
> way across any system in the world.
> Any suggestions?
> 
> Is there any way i can write XML files using the expat?
> 
> regards,
> Binu
> 
> 
> 
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Expat-discuss mailing list
> Expat-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/expat-discuss