note 73060 added to function.html-entity-decode

From: Date: Wed, 07 Feb 2007 18:27:55 +0000
Subject: note 73060 added to function.html-entity-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-123064@lists.php.net to get a copy of this message
I couldn't get this to convert numerical entities (like '&#8217') no matter what I tried. I found a bizarre solution on the following site: http://www.phpbuilder.com/board/showthread.php?t=10287185 Simply use 'cp1251' as the charset and it seems to work. e.g. <?php $text = "this is a &#8216;test&#8217;"; $text = html_entity_decode($text,ENT_QUOTES,'cp1251'); ?> ---- Server IP: 85.116.0.130 Probable Submitter: 82.35.218.50 ---- Manual Page -- http://www.php.net/manual/en/function.html-entity-decode.php Edit -- https://master.php.net/note/edit/73060 Del: integrated -- https://master.php.net/note/delete/73060/integrated Del: useless -- https://master.php.net/note/delete/73060/useless Del: bad code -- https://master.php.net/note/delete/73060/bad+code Del: spam -- https://master.php.net/note/delete/73060/spam Del: non-english -- https://master.php.net/note/delete/73060/non-english Del: in docs -- https://master.php.net/note/delete/73060/in+docs Del: other reasons-- https://master.php.net/note/delete/73060 Reject -- https://master.php.net/note/reject/73060 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#123064) next »