P is for Practical | |
PerlMonks |
XML, Unicode, and Internet Explorerby Tuppence (Pilgrim) |
on Apr 11, 2006 at 08:10 UTC ( [id://542477]=perlquestion: print w/replies, xml ) | Need Help?? |
Tuppence has asked for the wisdom of the Perl Monks concerning the following question: Hello fellow monks, I once again humbly beg for assistance. This question is not strictly perl related, although it is running through a system using mod_perl and HTML::Mason to fetch the data that is an issue. I need to be able to fetch Unicode data using internet explorer in an XML document. I'm trying to add some AJAX functionality to my site and Internet Explorer is complaining about my unicode characters in my XML. Mozilla likes it just fine, and I would assume that as soon as I can pull up the page OK in the browser window that my AJAX problem will go away as well and it will get the data directly. Internet Explorer says "The XML page cannot be displayed" and "An invalid character was found in text content. Error processing resource" I'm using HTML::Mason's |h escaping, which should be calling HTML::Entities::encode() and making the data happy. I've tried setting a content-type using $r->content_type of "text/xml; charset=UTF-8", as well as having <?xml version="1.0" encoding="UTF-8"?> as the first line of my XML file - but it doesn't like it. IE breaks on the UTF 8 encoded character. I suppose as a workaround I could just load the text and do some regex splitting action to get the pieces of data, but I would prefer to use XML and let the browser do the heavy lifting for me. Thank you in advance for your attention to my problem
Back to
Seekers of Perl Wisdom
|
|