note 23926 deleted from function.utf8-encode by cmb
| From: | cmb@php.net | Date: | Sun, 04 Dec 2016 12:16:02 +0000 |
| Subject: | note 23926 deleted from function.utf8-encode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208208@lists.php.net to get a copy of this message | ||
Note Submitter: dutoit at NOSPAM dot abonder dot com
----
To write an XML element $title containing "exotic" (eg. non ASCII é & à ñ...) 2
solutions I found :
Fastest :
$xml .= "<title><![CDATA[" . $title ."]]></title>\n"
or cleanest :
$xml .= "<title>".utf8_encode(htmlspecialchars($title))."</title>\n"
After that, your xml can be parsed without errors.