Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Url Encoding error!

Status
Not open for further replies.

FOR111

Programmer
Sep 29, 2005
103
0
0
MT
Hi,

I'm trying to send a request via http having one of the parameters encoded using URLEncoder with characterset UTF-8.

The encoding works and when i see the system output on the java console the string is encoded! The funny thing is that on one pc it works as it should and on the other the encoding is totally wrong!

Code:
correct encoding on PC #1: T5GNzCPm7jTv34UyxkOdwg%3D%3D
 
incorrect encoding on PC #2:T5GNzCPm7jTv34UyxkOdwg%[b]25[/b]3D%[b]25[/b]3D

bold = extra characters being shown!!

Any ideas on what can be wrong?

Thanks
Nick
 
The second string looks to have been encoded twice. The 25 is actually the '%' from the first encoding being itself encoded to %25 (25 is the hexadecimal value for %).

Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top