note 70154 deleted from function.utf8-decode by cmb
| From: | cmb@php.net | Date: | Sun, 11 Dec 2016 11:27:40 +0000 |
| Subject: | note 70154 deleted from function.utf8-decode by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-208519@lists.php.net to get a copy of this message | ||
Note Submitter: e dot panzyk at panzyk dot net
----
enhanced UTF8-Decoder
After recognising that UTF8-Decode converts some French Characters to "?" i end with that
Function.
The space will be need when a String ends with a converted Char ( a buggy Php Function will fit a
/hex00 char at the End )
function utf8dec ( $s_String )
{
$s_String = html_entity_decode(htmlentities($s_String." ", ENT_COMPAT,
'UTF-8'));
return substr($s_String, 0, strlen($s_String)-1);
}
Hope it helps ... cost me a lot of time ...