changing xml document lable (utf encoding) in php

I have a strange problem. I am trying to load some xml document using DomDocumnet function but it throws a strange warning saying that :

Warning: DOMDocument::load(): Document labelled UTF-16 but has UTF-8 content

There is no other errors or warnings etc.
when I manually edit the xml file from

<?xml version="1.0" encoding="utf-16"?> to

<?xml version="1.0" encoding="utf-8"?>

it process it flawlessly .

I am looking for a solution by which i can just edit xml file in header before further processing.

Thanks in advance..!

Source: xml

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.