I have these lines of PHP code which save a XML file. It works fine. I just need to make sure that the saved file uses Encoding UFT-8.
Problem is that the file is not saved as Encoding UFT-8 and since this file is used for an import process I get the import to run with some issues.
That is why I need to make sure the file is saved a UFT-8.
$newXml = $myXmlContent;
$newXml = simplexml_load_string( $newXml );
//... here a line of code to force this file to use Encoding UFT-8 //
$newXml->asXml('/home/example/www/myXmlFile.xml');
Just in case, this file is regenerated every day, that's why saving the file as UFT-8 using Notepad (or similar) will not solved my problem.