aspose file tools*
The moose likes Beginning Java and the fly likes Converting javascript escape codes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Converting javascript escape codes" Watch "Converting javascript escape codes" New topic
Author

Converting javascript escape codes

mrtuba
Greenhorn

Joined: May 29, 2001
Posts: 4
I have an application resident in a Domino database (so I am stuck in Java 1.1 and without the Servlet objects that may be cool for translating stuff like this). I need to take a URL and parse out the escape codes (like %20 becomes a space, etc.) I have the following code, and it works. But I was wondering if there is a function or API that can help me (remember . . . 1.1!?)
Thanks for your help.

[ May 18, 2002: Message edited by: Dirk Schreckmann ]

Tom McComb
Val Dra
Ranch Hand

Joined: Jan 26, 2001
Posts: 439
Take a look at StreamTokenizer it's been there since JDK1.0. It has a method to setWhiteChars which you can make these unwated characters as whitespace. Might be usefull to y ou.


Val SCJP <BR>going for SCJD
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
"mrtuba",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at http://www.javaranch.com/name.jsp . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.
Thanks.


Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Tom McComb
Ranch Hand

Joined: Jun 07, 2001
Posts: 30
Thanks for the guidance. (Previously known as mrtuba)

------------------
Tom McComb


Tom McComb
michelle cheung
Greenhorn

Joined: Jun 05, 2001
Posts: 11
Look in java.net
URLEncoder.encode( myString )
It works like the javascript escape function
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Converting javascript escape codes