For Programmers: Free Programming Magazines  


Home > Archive > PHP Programming > October 2007 > Strange behaviour with ' char









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Strange behaviour with ' char
Gotch@

2007-10-29, 8:01 am

Hi. I found a strange behaviour I cannot explain with the ' char. I do
the following:

1) there is a string with ' inside.
2) I encode the string with urlencode, I put it in a $_GET['arg']
variable
3) in the next page (pointed by the link that included the arg param),
I do $str=urldecode($_GET['arg'])

... then ' comes out as '/ ! (?)

Why? In the url arg contains %27 instead of ' ... The thing happens
*even if* I don't use urldecode :O :|

I think there is some processing done by _GET handling but I can't
find anything about this... Plese help :)

bye

AnrDaemon

2007-10-29, 8:01 am

Greetings, Gotch@.
In reply to Your message dated Monday, October 29, 2007, 13:58:13,

> Hi. I found a strange behaviour I cannot explain with the ' char. I do
> the following:


> 1) there is a string with ' inside.
> 2) I encode the string with urlencode, I put it in a $_GET['arg']
> variable
> 3) in the next page (pointed by the link that included the arg param),
> I do $str=urldecode($_GET['arg'])


> .. then ' comes out as '/ ! (?)


> Why? In the url arg contains %27 instead of ' ... The thing happens
> *even if* I don't use urldecode :O :|


> I think there is some processing done by _GET handling but I can't
> find anything about this... Plese help :)


Provide code example please.


--
Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com