|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-01-07 15:39 UTC] klooss at serviceconnect dot biz
Description:
------------
I have build an simple function to convert any string's
here the src:
function htmlconverter($str) {
return htmlentities($str,ENT_QUOTES,'ISO-8859-15');
}
echo ("? ' \" `");
echo "\n";
echo htmlconverter("? ' \" `");
/** Output
? ' " `
´ ' " `
**/
PHP Converted the Simbol >> ? << wrong.
as unicode in HTML ´
PHP Convert it in: &#180;
I found the problem on "Debian Etch amd64 - php5.2.4-2", "Suse php4.3.4" and "Win32 php5.2.3"
can anyone help my :) pls :)
thanks
Mathis Kloo? (Germany)
Reproduce code:
---------------
function htmlconverter($str) {
return htmlentities($str,ENT_QUOTES,'ISO-8859-15');
}
echo ("? ' \" `");
echo "\n";
echo htmlconverter("? ' \" `");
/** Output
? ' " `
&#180; ' " `
**/
Expected result:
----------------
? ' " `
´ ' " `
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 15:00:01 2025 UTC |
You can fix this bug with this code example $str='dwadwadawd&#180;dwadawd'; print(preg_replace("/&#(.*?);/","&#$1;",$str)); it is not so good but it's work...