note 57613 added to function.html-entity-decode

From: Date: Sat, 08 Oct 2005 20:15:35 +0000
Subject: note 57613 added to function.html-entity-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-96697@lists.php.net to get a copy of this message
If you want to decode NCRs to utf-8 use this function instead of chr(). function utf8_chr($code) { if($code<128) return chr($code); else if($code<2048) return chr(($code>>6)+192).chr(($code&63)+128); else if($code<65536) return chr(($code>>12)+224).chr((($code>>6)&63)+128).chr(($code&63)+128); else if($code<2097152) return chr($code>>18+240).chr((($code>>12)&63)+128) .chr(($code>>6)&63+128).chr($code&63+128)); } ---- Manual Page -- http://www.php.net/manual/en/function.html-entity-decode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+57613 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+57613&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+57613&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+57613&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+57613&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+57613&report=yes&reason=non-english Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+57613&report=yes&reason=already+in+docs Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+57613&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+57613&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#96697) next »