php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22277 utf8_encode and EURO sign
Submitted: 2003-02-18 11:20 UTC Modified: 2003-02-18 11:24 UTC
Votes:14
Avg. Score:3.6 ± 0.9
Reproduced:9 of 9 (100.0%)
Same Version:3 (33.3%)
Same OS:2 (22.2%)
From: mail2rk at gmx dot de Assigned:
Status: Wont fix Package: Strings related
PHP Version: 4.3.0 OS: any
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2003-02-18 11:20 UTC] mail2rk at gmx dot de
Try following:

<?

$xml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
$xml .= "<root>my ? sign</root>";
echo utf8_encode($xml);

?>

in the output the EURO sign won't show up.

While if you save the php file as utf8 and drop the 
utf8_encode method, the xml string will be shown properly.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-02-18 11:24 UTC] moriyoshi@php.net
utf8_encode() only supports iso-8859-1 to UTF-8 conversion, whilst the charset that covers euro sign is iso-8859-15.
Try iconv extension instead.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 05:01:29 2024 UTC