|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-12-02 21:21 UTC] derick@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 08:00:02 2025 UTC |
Description: ------------ When you want to display phrases or words with special characters in ISO format by XML, the special characters are not displayed correctly. Reproduce code: --------------- <? error_reporting(E_ALL & ~E_NOTICE); $xml = '<?xml version="1.0" encoding="ISO-8859-1"?><x>Test with some special characters: ? ? ? ? ?</x>'; $p = xml_parser_create(); xml_parser_set_option($p, XML_OPTION_CASE_FOLDING, 0); xml_set_element_handler($p, 'start_elem', 'end_elem'); xml_set_character_data_handler($p, 'cdata'); xml_parse($p, $xml, true); xml_parser_free($p); function start_elem($parser, $tagname, $attributes){} function end_elem($parser, $tagname){} function cdata($parser, $data){ echo $data; } ?> Expected result: ---------------- Test with some special characters: ? ? ? ? ? Actual result: -------------- Test with some special characters: é è ù ô ?