You are not logged in.
I have been trying to encode an ! in an url, but somehow it just doesn't work.
I tried RFC1738 codes -- one website mentioned the code was %21, a couple others said it was %22. However, both don't do any good.
Any pointers?
There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !
Offline
I get it as %21 using perl's uri encoder
$ echo -n '!' | perl -MURI::Escape -le 'print uri_escape <STDIN>'
%21
Offline
Can you encode "~", "#", "?" etc.?
Offline
Nevermind, misunderstood.
Last edited by Ramses de Norre (2010-08-11 11:23:48)
Offline
W3C is a very good resource for html and css, they say to encode ! as !
http://www.w3schools.com/tags/ref_ascii.asp
http://www.w3schools.com/tags/ref_entities.asp
http://www.w3schools.com/tags/ref_symbols.asp
I don't think you use html escape codes in urls.
Offline
Ramses de Norre wrote:W3C is a very good resource for html and css, they say to encode ! as !
http://www.w3schools.com/tags/ref_ascii.asp
http://www.w3schools.com/tags/ref_entities.asp
http://www.w3schools.com/tags/ref_symbols.aspI don't think you use html escape codes in urls.
You don't, I misread the question
Offline
I get it as %21 using perl's uri encoder
$ echo -n '!' | perl -MURI::Escape -le 'print uri_escape <STDIN>' %21
I agree with %21. You can also look it up at http://www.w3schools.com/tags/ref_urlencode.asp or use their "Try It Yourself" form.
Offline