There is the simple PHP script which parses XML document and show attribute of item (attribute is Russian, and XML file uses "utf-8" charset):
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<?php
//header('Content-Type: text/html; charset=utf-8');
$xml=simplexml_load_file('output.xml');
echo $xml['moves'];
?>
</body>
</html>
My XML:
<?xml version="1.0" encoding="UTF-8"?>
<game moves="Папа">
<a attr="2">123</a>
</game>
Using this code I see only "Папа instead of "Папа" russian text. But if I delete all HTML and set charset through header() PHP method it'll work correctly! How can I fix it?