I'm reading an XML file with Simplexml and outputting a translated XML file with a different name. Google Translate outputs everything in UTF-8 and in order to properly view extended characters I need the XML Prolog to contain the encoding info:
<?xml version="1.0" encoding="UTF-8"?>
Some files have no encoding info or even no prolog at all. Is there a specific method to change or add prolog info in XML files through PHP? Thank you.