note 49985 added to function.utf8-decode

From: Date: Mon, 14 Feb 2005 18:24:46 +0000
Subject: note 49985 added to function.utf8-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-85025@lists.php.net to get a copy of this message
function decode_utf8($str){ # erase null signs in string $str=eregi_replace("^.{10,13}q\?","",$str); # paterns $pat = "/=([0-9A-F]{2})/"; $cha="'.chr(hexdec("; # to decode with eval and replace eval("\$str='". preg_replace($pat,$cha."'$1')).'",$str). "';"); # return return $str; } Note: It's possible put it in 3 lines, but I don't got in this first code submition. ---- Manual Page -- http://www.php.net/manual/en/function.utf8-decode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+49985 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+49985&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+49985&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+49985&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+49985&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+49985&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+49985&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85025) next »