|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15027 Unicode chars (query string decoding)
Submitted: 2002-01-14 05:57 UTC Modified: 2002-04-09 18:38 UTC
Avg. Score:4.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: nataniel at implix dot com Assigned:
Status: Not a bug Package: *Languages/Translation
PHP Version: 4.1.1 OS: All
Private report: No CVE-ID: None
 [2002-01-14 05:57 UTC] nataniel at implix dot com
urldecode() function is not supporting UNICODE characters coding, like %u0627 for the Arabic letter ALEF (ا in HTML). So when you are passing the Unicode chars through GET/POST or urldecode(), you will get only encoded string:

in test.php:
print('test = '.$test);

you will get:
test = %u062D%u0645%u0627%u062F%u0629

What you have to do is to "manually" convert it to html entitles:
function unicode_decode($txt) {
  return ereg_replace('%u0([[:alnum:]]{3})', '&#x\1;',$txt);


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-09 18:38 UTC]
%u encoding is not standard.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Jul 04 02:01:25 2020 UTC