When you put UTF-8 encoded strings into an XML document you should remember that not all UTF-8 characters are accepted in an XML document http://www.w3.org/TR/REC-xml/#charsets

You should strip away the invalid characters, else you’ll have an XML fatal parsing error tossed during parsing.

It’s rather easy to accomplish this using the following function.


Leave a Reply

Your email address will not be published. Required fields are marked *