(9858) Java 1.4.2 URLEncode Encoding?

Archive of the OpenVMS Ask the Wizard (ATW) questions and answers database.
Locked

Topic author
User
Visitor
Posts: 0
Joined: Mon Jan 10, 2022 8:16 am
Reputation: 0
Status: Offline

(9858) Java 1.4.2 URLEncode Encoding?

Post by User » Sat Oct 02, 2004 9:26 am

While using Java through Tomcat 4.1 and SDK 1.4.2, I am trying to encode a string using the URLEncoder class. When I use this method on the Alpha machine it is appending random "^" symbols in the string. This only happens on OpenVMS and not a PC environment of the same code.

Example:

Code: Select all

String myString = "hello$how are you$123";
String myEncodedString = URLEncoder.encode(myString,"UTF-8")
System.out.println(myEncodedString);
output:

Code: Select all

"hello$how^+are^+you$123";
This should be:

Code: Select all

"hello$how+are+you$123";
Why does this behavior occur?
Last edited by marty.stu on Thu Aug 25, 2022 7:05 am, edited 1 time in total.


Wizard
Visitor
Posts: 0
Joined: Mon Jan 10, 2022 8:17 am
Reputation: 0
Status: Offline

Re: (9858) Java 1.4.2 URLEncode Encoding?

Post by Wizard » Sun Oct 03, 2004 9:26 am

Please contact the support, as attempts to reproduce this have failed -- information on the current configuration and the run-time environment, associated product versions and ECOs, and the full JSP will likely be required.
Last edited by marty.stu on Thu Aug 25, 2022 7:06 am, edited 1 time in total.

Locked