note 85888 added to function.get-html-translation-table

From: Date: Tue, 23 Sep 2008 12:54:39 +0000
Subject: note 85888 added to function.get-html-translation-table
Groups: php.notes 
Request: Send a blank email to php-notes+get-144634@lists.php.net to get a copy of this message
to display the mapping on a webpage no matter what the server encoding is, this can be used echo "<pre>\n"; echo htmlentities(print_r((get_html_translation_table(HTML_SPECIALCHARS)), true)); echo htmlentities(print_r((get_html_translation_table(HTML_ENTITIES)), true)); since get_html_translation_table() actually gives the special chars in iso-8859-1 (Latin-1) encoding, so to see the tables correctly using print_r(get_html_translation_table(HTML_ENTITIES)); your server needs to give a HTTP header as iso-8859-1, unless you use header() or manually set the browser's encoding setting to iso-8859-1. And you need to view the source of the page to see the mapping. (except English version of IE 7 outputs the page source as iso-8859-1 anyway). ---- Server IP: 64.71.164.2 Probable Submitter: 70.137.173.113 ---- Manual Page -- http://www.php.net/manual/en/function.get-html-translation-table.php Edit -- https://master.php.net/note/edit/85888 Del: integrated -- https://master.php.net/note/delete/85888/integrated Del: useless -- https://master.php.net/note/delete/85888/useless Del: bad code -- https://master.php.net/note/delete/85888/bad+code Del: spam -- https://master.php.net/note/delete/85888/spam Del: non-english -- https://master.php.net/note/delete/85888/non-english Del: in docs -- https://master.php.net/note/delete/85888/in+docs Del: other reasons-- https://master.php.net/note/delete/85888 Reject -- https://master.php.net/note/reject/85888 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144634) next »