php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #23292 xml_parse / xml_parser_create does not use (input) encoding from XML header
Submitted: 2003-04-20 21:10 UTC Modified: 2003-05-14 05:34 UTC
From: adam at indexdata dot dk Assigned:
Status: Closed Package: Feature/Change Request
PHP Version: 4.3.2RC1 OS: Linux 2.4.19
Private report: No CVE-ID: None
 [2003-04-20 21:10 UTC] adam at indexdata dot dk
xml_parse / xml_parser_create does not
use (input) encoding from XML header even though 
EXPAT supports that feature. If xml_parser_create
is called with with no arguments, XML file
is assumed to be of type ISO-8859-1 (default_encoding).

It would be desirable if there was a way to
make PHP call EXPAT's XML_ParserCreate(encoding)
with encoding == NULL
to force EXPAT to perform the proper character set
conversion to output character set (TARGET_ENCODING).

Inspecting source from latest PHP, suggests that
this applies to many PHP versions.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-20 21:38 UTC] dickmeiss@php.net
For test case see
 http://dickmeiss.net/23292/
 [2003-05-14 05:34 UTC] dickmeiss@php.net
Fixed in PHP5 CVS. Specify "" for encoding
in xml_parser_create to achieve proper character set
decoding.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jun 03 06:01:31 2024 UTC