Jump to content

XML Encoding


cjackson111

Recommended Posts

Hello all. I have a php script that creates an xml file pulled from a mysql database. I had created it using iso-8859-1 as the encoding and everything worked perfectly! However, the client wants it encoded at UTF-8.

 

$_xml ="<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\r\n";

 

When I do that I get the following error --

 

An invalid character was found in text content. Error processing resource 'http://www.....

 

 

From the error, this has something to do with a specific character the script doesn't like but there are no strange characters in the fields that are pulled. Any ideas what may be the problem?

 

I would greatly appreciate any help!

Link to comment
https://forums.phpfreaks.com/topic/253907-xml-encoding/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.