note 82534 added to function.htmlentities
| From: | za at byza dot it | Date: | Tue, 15 Apr 2008 16:15:05 +0000 |
| Subject: | note 82534 added to function.htmlentities | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-138332@lists.php.net to get a copy of this message | ||
Trouble when using files with different charset?
htmlentities and html_entity_decode can be used to translate between charset!
Sample function:
function utf2latin($text) {
$text=htmlentities($text,ENT_COMPAT,'UTF-8');
return html_entity_decode($text,ENT_COMPAT,'ISO-8859-1');
}
----
Server IP: 213.92.11.19
Probable Submitter: 151.47.216.109
----
Manual Page -- http://www.php.net/manual/en/function.htmlentities.php
Edit -- https://master.php.net/note/edit/82534
Del: integrated -- https://master.php.net/note/delete/82534/integrated
Del: useless -- https://master.php.net/note/delete/82534/useless
Del: bad code -- https://master.php.net/note/delete/82534/bad+code
Del: spam -- https://master.php.net/note/delete/82534/spam
Del: non-english -- https://master.php.net/note/delete/82534/non-english
Del: in docs -- https://master.php.net/note/delete/82534/in+docs
Del: other reasons-- https://master.php.net/note/delete/82534
Reject -- https://master.php.net/note/reject/82534
Search -- https://master.php.net/manage/user-notes.php