Hello:

When I encode the name of an image file to place into a URL, I use this
code:

URLEncoder.encode(imageName,"UTF-8")

This gives me image names with spaces replaced by + signs which IE does not
like. 

If I change the spaces to %20, the URL works perfectly in IE.

For example, if my image name is Ping G2 Driver.gif, URLEncoder gives me
this URL:
 <http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping+G2+Driver.gif>
http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping+G2+Driver.gif

If I try to load this URL in IE, it gives me a 404 error.

If I use the exact same url with %20, it works just fine:
 
<http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping%20G2%20Driver.g
if>
http://dev.rentclubs.com/~maryanne/images/clubs/Driver/Ping%20G2%20Driver.gi
f

I thought + and %20 were both acceptable for spaces in a URL, but apparently
IE does not like the plus signs.  
 
Is there a way to force URLEncoder to use %20 instead of + signs?
 
Thanks,
    Neil
 
--
Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less!  <http://newsletter.JAMMConsulting.com>
http://newsletter.JAMMConsulting.com 

Reply via email to