ID:               15027
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         *Languages/Translation
 Operating System: All
 PHP Version:      4.1.1
 New Comment:

%u encoding is not standard.


Previous Comments:
------------------------------------------------------------------------

[2002-01-14 05:57:26] [EMAIL PROTECTED]

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:

http://server.com/test.php?test=%u062D%u0645%u0627%u062F%u0629

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);
}
------------------------------------------------------------

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=15027&edit=1

Reply via email to