Roland - thanks for that (decoding then encoding) That has solved the problem. I guess IE must do something similar... cheers
> -----Original Message----- > From: Roland Weber [mailto:[EMAIL PROTECTED] > Sent: 07 February 2006 11:51 > To: HttpClient User Discussion > Subject: Re: URL encoding problem > > Hi Matt, > > > > action=query&text=%2528%2528MRH%2529%2529+&&DATABASEMATCH=Depo > sited_Papers%2 > > > 0European_Materials&maxresults=1000&printfields=*/CONTENT-TYPE > ,*/UID&predict > > =false&totalresults=true&combine=simple > > > > > > My problem is that the '%28' characters have been > re-encoded as '%2528' > and > > this causes the Get request to fail for my purposes. > > InternetExplorer and FireFox don't do this (they only > encode the space > > character). > > How can I get HttpClient to encode in this same way so that > my query > > is successful. > > You can't. You have to present to HttpClient a URL that is > either completely escaped, or not at all. You can try whether > the java.net.URL or java.net.URI classes serve your purpose. > You can alse try to decode the string first, then re-encode > it. That would prevent double encoding. > > hope that helps, > Roland > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: > [EMAIL PROTECTED] >
