Hi everybody
I’m not a contributor to Modx project but recently I had to modifiy document.parser.class.inc.php to generate valid BOM carrying XML UTF-8 files for a project.
Perhaps it’s worth to add this lines of code to the core parse function so everybody can enjoy this added feature...
Basically you have to insert the following lines in the above mentioned file at aprox line 473:
if ($type == "text/xml" && $this->config['modx_charset'] == "UTF-8"){
echo pack ( "C3" , 0xef, 0xbb, 0xbf );
}
Regards and hope it’s useful to someone