note 104342 added to function.mb-convert-encoding
| From: | Alexanderdotbooneatmnsudotedu at osu1 dot php dot net | Date: | Thu, 09 Jun 2011 17:50:43 +0000 |
| Subject: | note 104342 added to function.mb-convert-encoding | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-180388@lists.php.net to get a copy of this message | ||
I was having trouble parsing an Excel document to html, this seems to do the trick for character
encoding.
function decode_characters($info)
{
$info = mb_convert_encoding($info, "HTML-ENTITIES", "UTF-8");
$info = preg_replace('~^(&([a-zA-Z0-9]);)~',htmlentities('${1}'),$info);
return($info);
}
----
Server IP: 69.147.83.197
Probable Submitter: 134.29.32.193
----
Manual Page -- http://www.php.net/manual/en/function.mb-convert-encoding.php
Edit -- https://master.php.net/note/edit/104342
Del: integrated -- https://master.php.net/note/delete/104342/integrated
Del: useless -- https://master.php.net/note/delete/104342/useless
Del: bad code -- https://master.php.net/note/delete/104342/bad+code
Del: spam -- https://master.php.net/note/delete/104342/spam
Del: non-english -- https://master.php.net/note/delete/104342/non-english
Del: in docs -- https://master.php.net/note/delete/104342/in+docs
Del: other reasons-- https://master.php.net/note/delete/104342
Reject -- https://master.php.net/note/reject/104342
Search -- https://master.php.net/manage/user-notes.php