#19569 [NEW]: urlencode() problem encoding strings single quotes
| From: | dbarndt at ntlpromos dot com | Date: | Tue, 24 Sep 2002 07:01:29 +0000 |
| Subject: | #19569 [NEW]: urlencode() problem encoding strings single quotes | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-20168@lists.php.net to get a copy of this message | ||
From: dbarndt@ntlpromos.com
Operating system: Windows NT 4.0 SP6
PHP version: 4.2.3
PHP Bug Type: *URL Functions
Bug description: urlencode() problem encoding strings single quotes
I really hesitated putting this in as a bug, because it seems so simple.
The urlencode() documentation seems to imply that the following script
should work fine, however it fails to output the second printf() on my
system. I am running with the php.ini-recommended INI file on Windows NT
4.0 SP6. (I've tried various combinations of htmlentities() and
htmlspecialchars() with the urlencode() as well, but so far without
success.)
Here's the script:
<html>
<head>
</head>
<body>
<?php
$test_str = "Mickey's Fun House";
printf ($test_str);
$encoded_str = urlencode ($test_str);
printf ($encoded_str);
?>
</body>
</html>
If this is something stupid on my end, I apologize for the bother.
Thanks,
Dave Barndt
--
Edit bug report at http://bugs.php.net/?id=19569&edit=1
--
Try a CVS snapshot: http://bugs.php.net/fix.php?id=19569&r=trysnapshot
Fixed in CVS: http://bugs.php.net/fix.php?id=19569&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=19569&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=19569&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=19569&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=19569&r=support
Expected behavior: http://bugs.php.net/fix.php?id=19569&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=19569&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=19569&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=19569&r=globals