I want to check encoding of file xml is UTF-8. How check encoding of this file xml in php?
You can try with:
mb_check_encoding(file_get_contents("file.xml"), 'UTF-8');