ID:               45602
 Updated by:       [EMAIL PROTECTED]
 Reported By:      samuel at slbdata dot se
 Status:           Open
 Bug Type:         URL related
 Operating System: Ubuntu 8.04.1
 PHP Version:      6CVS-2008-07-23 (snap)
 New Comment:

See also bug #45566 (you missed the hash there :)


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

[2008-07-23 11:44:14] samuel at slbdata dot se

Description:
------------
The "URL Generic Syntax" specification (RFC 2396) says that URLs must
be US-ASCII. However, the PHP urlencode/decode functions return/accept
binary data only. I think the correct behaviour would be to use Unicode
(which is a superset of ASCII) for the encoded values.

(This might affect some other URL-related functions, but
urlencode/urldecode are the only ones that I know)

See also bug 45566 . Since it's quite likely for urldecode's input to
come from the $_SERVER superglobal, I think either both or none of the
bugs should be fixed.


Reproduce code:
---------------
<?php
echo urldecode("%50%48%50\n");

Expected result:
----------------
PHP

Actual result:
--------------
PHP Warning:  urldecode() expects parameter 1 to be strictly a binary
string, Unicode string given in - on line 3

Warning: urldecode() expects parameter 1 to be strictly a binary
string, Unicode string given in - on line 3



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


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

Reply via email to