No subject
Sat Nov 12 19:29:10 PST 2005
encoding for Query String.
Should be confirmed by looking for documentation about CGI and protocol
HTTP et URL
So, it's expired documentation but.... (from quick search).....
Coar, et al. INTERNET-DRAFT [Page
5]
CGI/1.1 Expires: 29 November, 1998
An alternate "shortcut" encoding for representing the space character
exists and is in common use. Scripts MUST be prepared to recognise
both '+' and '%20' as an encoded space in a URL.
Note that some unsafe characters may have different semantics if they
are encoded. The definition of which characters are unsafe depends on
the context. See section 2.2 of RFC 1738 [4] for authoritative
treatment of this issue.
from :
http://www.ics.uci.edu/pub/ietf/http/related/draft-coar-cgi-v11-00.txt
jean
adam wrote:
>
> hi all,
>
> could somebody answer a this for me and sooth my addled grey matter:
>
> why does the following :
>
> System.out.println(java.net.URLEncoder.encode("?dave=shep&amount=1&Personid=PIDLBWWCPWDUMO4/4/2000
> 2:24:09 PM"));
>
> produce
>
> %3Fdave%3Dshep%26amount%3D1%26Personid%3DPIDLBWWCPWDUMO4%2F4%2F2000+2%3A24%3A09+PM
>
> NOTE the '+' character instead of spaces which seems to me very
> un-encoded.... i would have expected %20
>
> thanks in advance
> adam
> adam at beenz.com
> director of new technologies
> -- beenzlab --
--
Jean ANDRE, V.P R & D Team, SurfNShop E Commerce Inc.
http://corp.surfnshop.com
800 Square Victoria, Tour de la bourse / Stock Exchange Tower
Suite 4105 C.P 311 Montreal, Quebec H4Z 1G8
Tel: (514) 398-9799 #24 Fax: (514) 398-9353
---
To unsubscribe, mail advanced-java-unsubscribe at xcf.berkeley.edu
To get help, mail advanced-java-help at xcf.berkeley.edu
More information about the Advanced-java
mailing list