note 73060 deleted from function.html-entity-decode by nlopess
| From: | nlopess@php.net | Date: | Wed, 07 Feb 2007 20:04:33 +0000 |
| Subject: | note 73060 deleted from function.html-entity-decode by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-123071@lists.php.net to get a copy of this message | ||
Note Submitter: me [at] timlewis (dot) org
----
I couldn't get this to convert numerical entities (like '’') 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 ‘test’";
$text = html_entity_decode($text,ENT_QUOTES,'cp1251');
?>