I have some string with unicode characters and was endcoded with javascript decodeURIcomponent.But i dont find any equivalent in php to decode it.Is there any solution for this?
A:
urldecode()
However you do not need to use it on $_REQUEST variables, which are already decoded automatically.
tandu
2010-10-09 08:28:31
i have used $_POST for fetching,but urldecode() doesnt work on unicode characters.
neo-nant
2010-10-09 08:35:01
<?php function utf8_urldecode($str) { $str = preg_replace("/%u([0-9a-f]{3,4})/i","\\1;",urldecode($str)); return html_entity_decode($str,null,'UTF-8');; }?>
tandu
2010-10-09 08:37:06