I have written a php application that parses an XML file and uploads the values to a database. However, when I try to upload a different language like french for example my PHP outputs errors as shown below.
Warning: DOMDocument::loadXML() [domdocument.loadxml]: Input is not proper UTF-8, indicate encoding ! Bytes: 0xE9 0x6E 0x6F 0x6D in Entity, line: 8 in C:\wamp\www\admin\classes\admin.class.php on line 2017
I have tried changing the encoding, but still no luck.PHP Code:
<?xml version="1.0" encoding="utf-8" ?>
<phrase>Nouvel enregistrement d'utilisateur Prénom</phrase>
1) Which encoding should I be using in this XML document?
2) Is there any special validation that I need to do before inserting the <phrase> value into the database or can it just be inserted as is?
Thank you in advance. :)