Делаю парсинг. Все работает, вот только у температуры вместо длинного минуса выводится какая то ерунда (в€’), документ в кодировке windows 1251, даже кодировка utf 8 не решает проблемы... как исправить ? Код (PHP): <?php $xml = simplexml_load_file('31510.xml'); $temp=$xml->temperature; echo $temp; ?> Код (Text): <?xml version="1.0" encoding="utf-8"?> <weather><date><day>24</day><month>10</month><year>2015</year></date><city>Благовещенск</city><country>Россия</country><weather_type>ясно</weather_type><image>http://weather.yandex.ru/i/n7.gif</image><image2>http://weather.yandex.ru/i/n7.png</image2><temperature>−3</temperature><pressure>758</pressure><dampness>28</dampness><weather_type>ясно</weather_type><image>http://weather.yandex.ru/i/n7.gif</image><image2>http://weather.yandex.ru/i/n7.png</image2><temperature>−3</temperature><pressure>758</pressure><dampness>28</dampness></weather>
Заработало вот с этим header('Content-Type: text/html; charset=utf-8'); А простое сохранение документа в utf-8 не срабатывало