Escaping

Reply

Join Date: Jun 2004
Posts: 609
Reputation: freesoft_2000 is an unknown quantity at this point 
Solved Threads: 7
freesoft_2000 freesoft_2000 is offline Offline
Practically a Master Poster

Escaping

 
0
  #1
Oct 6th, 2006
Hi everyone,

I need to ask a rather silly question on escaping quotes so please bear with me for a while.

As i am using java this is what i usually do to escape quotes

  1. "/"Test"/"

It usually works but my question is that is this a platform independent way of doing it?

If not then what is the paltform independent way of doing it?

Any help is greatly appreciated

Thank You

Yours Sincerely

Richard West
Last edited by freesoft_2000; Oct 6th, 2006 at 6:03 pm.
Microsoft uses "One World, One Web, One Program" as a slogan.
Doesn’t that sound like "Ein Volk, Ein Reich, Ein Führer" to you, too?
— Eric S. Raymond

Tell me what type of software do you like and what would you pay for it

http://www.daniweb.com/techtalkforums/thread19660.html
Reply With Quote Quick reply to this message  
Join Date: Nov 2005
Posts: 74
Reputation: Cudmore is an unknown quantity at this point 
Solved Threads: 5
Cudmore's Avatar
Cudmore Cudmore is offline Offline
Junior Poster in Training

Re: Escaping

 
0
  #2
Oct 6th, 2006
I think the proper way to escape Quotes is

"Here is some \"Text inside Quotes\"" :rolleyes:

And no. It's not platform-independent.. That would be the File Separator, which is "\" in Windows and "/" in Unix (as an example).. In Java, \ always escapes the following character.
Last edited by Cudmore; Oct 6th, 2006 at 6:15 pm. Reason: To add color
synchronized (theWorld) { System.out.println ("It's all mine..."); }
How many people have code in their Sigs?
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC