From: clemens at gutweiler dot net
Operating system: Linux
PHP version: 4.4.0
PHP Bug Type: WDDX related
Bug description: problems with umlaut characters and utf-8
Description:
------------
umlaut characters in charset utf-8 get not correct en/decoded with
wddx_serialize_value resp. wddx_deserialize.
in php-5 the code with the xml-header and utf-8 encoding returns the
iso-8859-1 chars and not the utf-8 charts - that is a bug too, or?
Reproduce code:
---------------
<?php
header( 'Content-Type: text/html; charset=UTF-8' );
echo '<pre>';
$original = utf8_encode( 'umlaute: '.chr( 220 ).chr( 228 ).chr( 246
).chr( 223 ) );
var_dump( $original );
$wddx = wddx_serialize_value( $original );
#var_dump( htmlentities( $wddx ) );
$data = wddx_deserialize( $wddx );
var_dump( $data );
$data = wddx_deserialize( '<?xml version="1.0" encoding="UTF-8"
?>'."\n".$wddx );
var_dump( $data );
?>
Expected result:
----------------
string(17) "umlaute: Üäöß"
string(17) "umlaute: Üäöß"
string(17) "umlaute: Üäöß"
Actual result:
--------------
string(17) "umlaute: Üäöß"
string(17) "umlaute: ÿäöÿ"
string(17) "umlaute: ÿäöÿ"
--
Edit bug report at http://bugs.php.net/?id=34928&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=34928&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=34928&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=34928&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=34928&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=34928&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=34928&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=34928&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=34928&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=34928&r=support
Expected behavior: http://bugs.php.net/fix.php?id=34928&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=34928&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=34928&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=34928&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=34928&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=34928&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=34928&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=34928&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=34928&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=34928&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=34928&r=mysqlcfg