php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #30964 Wrong display of special characters
Submitted: 2004-12-02 17:53 UTC Modified: 2004-12-02 21:21 UTC
From: pitchoune at vbulletin-fr dot org Assigned:
Status: Not a bug Package: XML related
PHP Version: 5CVS-2004-12-02 (dev) OS: Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: pitchoune at vbulletin-fr dot org
New email:
PHP Version: OS:

 

 [2004-12-02 17:53 UTC] pitchoune at vbulletin-fr dot org
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: é è ù ô ?

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-12-02 21:21 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See #30951
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 11:01:30 2024 UTC