php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33074 XML retrieve function - especial character error
Submitted: 2005-05-20 04:13 UTC Modified: 2005-05-20 08:33 UTC
From: servisoft_mail at yahoo dot com Assigned:
Status: Not a bug Package: *XML functions
PHP Version: 5.0.4 OS: RedHat Enterprise Linux 3.0
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: servisoft_mail at yahoo dot com
New email:
PHP Version: OS:

 

 [2005-05-20 04:13 UTC] servisoft_mail at yahoo dot com
Description:
------------
by Cristian / Leonardo

We are using a XML function and there are a problem with special caracter in Portuguese Brazilian language.

When i use the function:

xml_set_character_data_handler($xml_parser, $cdata);

the retrieved data is truncated, ex:

normal(PHP/4.3.11) - "S?tio"

      (PHP/5.0.4) - "çtio"

we did tried convert to UTF-8 and ISO formats, linux language and a lot of things but there is no way.
the only problem fix was reinstaling PHP/4.3.11



Reproduce code:
---------------
$xml_parser = xml_parser_create();
xml_set_element_handler($xml_parser, $start, $end);
xml_set_character_data_handler($xml_parser, $cdata);


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-05-20 08:33 UTC] chregu@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

The output is UTF-8 by default. You have to convert that to ISO-8859-1 (from UTF-8), if you want ISO output.

See also the docs for xml_parser_create about character encoding
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 11:01:28 2024 UTC