This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Java in General and the fly likes String encoding in unicode format Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "String encoding in unicode format" Watch "String encoding in unicode format" New topic
Author

String encoding in unicode format

chnaresh Cheedella
Greenhorn

Joined: Nov 01, 2006
Posts: 7
Hi ,

I want a method in java which will exactly work same as javascript's
escape() method. Please help me.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Not an advanced question. Moving...


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Getting something that work exactly as the JavaScript escape function does will be hard - since it only works with ASCII characters. However [URL=http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLEncoder.html#encode(java.lang.String, java.lang.String)]URLEncoder[/url] does that same sort of thing.

[ November 14, 2006: Message edited by: Paul Sturrock ]
[ November 14, 2006: Message edited by: Paul Sturrock ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: String encoding in unicode format
 
Similar Threads
garbage collection
Changin font in a JTextArea
Sharpen your Pencil - Page 323 in HFEJB
Finalization Method
NX: When should I throw DuplicateKeyException?