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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Wed Apr 24 19:01:31 2024 UTC