|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-05-21 16:31 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Dec 18 10:00:02 2025 UTC |
Description: ------------ XML parsing breaks some national encoding, however there shouldn't be any problem width it. Reproduce code: --------------- $xml = file_get_contents('http://xml.vht.cz/demo.xml'); $xml_parser = xml_parser_create(); xml_set_character_data_handler($xml_parser, "characterData"); xml_parse($xml_parser,$xml,true); xml_parser_free($xml_parser); function characterData($parser, $data) { $data = trim($data); if($data) var_dump($data); } Expected result: ---------------- Expexted original data with original encoding (like this): Sutomore - hotel Zlatna obala Ji?? Bu?ek - CK VHT Hotelov? komplex Zlatna Obala je um?st?n ve vzd?lenosti cca 500 m od Sutomore. M? vlastn? pl?? v prost?ed? piniov?ho h?je.<br> Actual result: -------------- Broken encoding (absolutely wrong characters) string(29) "Sutomore - hotel Zlatna obala" string(2) "Ji" string(20) "ří Buček - CK VHT" string(7) "Hotelov"