From:             thies at thieso dot net
Operating system: linux
PHP version:      5CVS-2005-03-30 (dev)
PHP Bug Type:     XML related
Bug description:  starting with 5.x the XML extension returns data in different 
encoding

Description:
------------
see code:
php 4.x will return the data in 'ISO8859-1'
php 5.x will return data in 'UTF8'

this will break every single script that uses non-UTF8 encoded xml-files
with the "old" xml extension (OK only if you use more than "US-ASCII"
characters in the xml).

this BC break happened when we switched from expat to libxml.

sidenote: as php does not support UTF8 natively i think it makes little
sense to make this the default return-encoding for any internal-function.

btw: if you pass the 'ISO-8859-1' to xml_parser_create the php5.x behavior
is like php4.x.







Reproduce code:
---------------
<?php
$xml = '<?xml version="1.0" encoding="ISO8859-1"?><a>����</a>';
xml_parse_into_struct(xml_parser_create(), $xml, $v, $i);
echo $v[0]['value'];
?>

Expected result:
----------------
(can't paste cause of encoding)

Actual result:
--------------
(can't paste cause of encoding)

-- 
Edit bug report at http://bugs.php.net/?id=32498&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=32498&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=32498&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=32498&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=32498&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=32498&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=32498&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=32498&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=32498&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=32498&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=32498&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=32498&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=32498&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=32498&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=32498&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=32498&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=32498&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=32498&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=32498&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=32498&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=32498&r=mysqlcfg

Reply via email to