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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help With a Parsing Problem

Status
Not open for further replies.

RodgerRafter

Programmer
Joined
Feb 4, 2005
Messages
1
Location
US
I'm trying to take input from an HTML text form and store it in mySQL with HTML tags so that the output appears like the users input. My problem is that I don't know how to recognize the return key so that I can turn it into "<br>".

My code already checks each character of input and .inserts "\" when c.equals("\"").

What can i do to achieve the equivalent of c.equals(The RETURN KEY)?

Is there another way I can check to see if a RETURN character is in the text so that I can change it to <br>?

Thanks.
 
To be accurate, we shouldn't mix keys (Return) with characters ('\n', ['\n'+'\r' on win-plattform]).

To handle special characters, most important: ("'"), take a look (and a test if it looks promising) at the docs for PreparedStatement.



seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top