#23292 [Opn->Csd]: xml_parse / xml_parser_create does not use (input) encoding from XML header

From: Date: Wed, 14 May 2003 10:34:07 +0000
Subject: #23292 [Opn->Csd]: xml_parse / xml_parser_create does not use (input) encoding from XML header
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39617@lists.php.net to get a copy of this message
 ID:               23292
 Updated by:       dickmeiss@php.net
 Reported By:      adam at indexdata dot dk
-Status:           Open
+Status:           Closed
 Bug Type:         Feature/Change Request
 Operating System: Linux 2.4.19
 PHP Version:      4.3.2RC1
 New Comment:

Fixed in PHP5 CVS. Specify "" for encoding
in xml_parser_create to achieve proper character set
decoding.


Previous Comments:
------------------------------------------------------------------------

[2003-04-20 21:38:34] dickmeiss@php.net

For test case see
 http://dickmeiss.net/23292/

------------------------------------------------------------------------

[2003-04-20 21:10:50] 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.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=23292&edit=1



Thread (3 messages)

« previous php.bugs (#39617) next »