From:             pitchoune at vbulletin-fr dot org
Operating system: Windows
PHP version:      5CVS-2004-12-02 (dev)
PHP Bug Type:     XML related
Bug description:  Wrong display of special characters

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: é è ù ô Ã

-- 
Edit bug report at http://bugs.php.net/?id=30964&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30964&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=30964&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=30964&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30964&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30964&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30964&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30964&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30964&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30964&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30964&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=30964&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=30964&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30964&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30964&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30964&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30964&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30964&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30964&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30964&r=mysqlcfg

Reply via email to