0

While generating xml, it doesn't support some special characters like ébé.. It returns the error message as 'XML Parsing Error: not well-formed' in development server. but it works fine in production server. I am not sure anything need to be changed in php server settings.Please advice me.

Sample code

<?xml version='1.0' encoding='UTF-8' ?>
<result>
  <subcategory id="969"><![CDATA[ Québécois ]]></subcategory>   
</result>

Thanks in Advance.

Siva
  • 44
  • 5
  • Where does this error message come from? Is it a PHP error message or by some component other than PHP? What is the related code to this? Your question suggests that you need to double-check that the characters you use are proberly UTF-8 encoded. Are they? How did you verify they are? Also [provide a hex-dump of the string in question](http://stackoverflow.com/q/1057572/2261774). – M8R-1jmw5r Apr 15 '13 at 21:07
  • No its xml error message. I am also doing UTF-8 encoding.. it works fine in production server.. – Siva Apr 16 '13 at 04:59

1 Answers1

0

Are both file actually encoded in utf-8? ( Look around in your editor for engoding options. ) This xml is indeed valid. Also check the encoding of the processing side.

MrKekson
  • 720
  • 6
  • 18
  • yes both are same file only. but how it works fine in production server?.. anything need to be changed in php settings? – Siva Apr 16 '13 at 05:02
  • it's just a guess, but if it works with normal chars than, maybe the regional settings of your server is different, or the file whats processing your xml is not in the same encoding as your xml – MrKekson Apr 16 '13 at 11:20