a question about URL encoding

2008-05-07 Thread Jim the Standing Bear
Hello,

I read somewhere that the URL Encoding of the space character can be
either %20 or +.  The behavior of the URLEncoders from both
commons-codec and jdk converts spaces to +.  Is there anyway to force
the URLEncoder to convert spaces to %20 instead?  Thanks.

- Jim

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: which commons codec converts space to %20?

2008-05-07 Thread Henri Yandell
It probably needs to be an option added to the URLEncoder class. I
doubt there's anything that does this for you right now.

For now - I would recommend that you use a search and replace on the
output of URLEncoder to change the + to %20.

Hen

On Mon, May 5, 2008 at 9:23 PM, Jim the Standing Bear
[EMAIL PROTECTED] wrote:
 hello,

  I am always under the impression that URL encoding converts spaces to
  %20, and only to find out the URLEncoder from both commons-codec and
  java converts spaces to + signs.

  So the question is, which codec converts spaces to %20?  I am working
  on a piece of code that allows users to download some files, and if
  the spaces in the filenames are converted to + signs, then firefox
  automatically chops off everything from the first + to the end.  So
  I would like to convert them to %20 instead, but not sure which code
  actually does that.  Thanks.

  - Jim

  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: a question about URL encoding

2008-05-07 Thread Jörg Schaible
Hi Jim,

Jim the Standing Bear wrote:
 Hello,
 
 I read somewhere that the URL Encoding of the space character can be
 either %20 or +.  The behavior of the URLEncoders from both
 commons-codec and jdk converts spaces to +.  Is there anyway to force
 the URLEncoder to convert spaces to %20 instead?  Thanks.

Benjamin Bentman created a quite valuable summary of the situation for the 
Maven devs: 
http://thread.gmane.org/gmane.comp.jakarta.turbine.maven.devel/83251/focus=85098

- Jörg

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]