php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34928 problems with umlaut characters and utf-8
Submitted: 2005-10-20 11:01 UTC Modified: 2005-10-24 20:10 UTC
From: clemens at gutweiler dot net Assigned:
Status: Closed Package: WDDX related
PHP Version: 4.4.0 OS: Linux
Private report: No CVE-ID: None
 [2005-10-20 11:01 UTC] clemens at gutweiler dot net
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: ????"



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-10-20 11:20 UTC] tony2001@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. 

Thank you for your interest in PHP.

See bug #34913.

 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Jan 20 20:01:24 2021 UTC