HTML Form posting contains weird characters when using single quote, double quote or dash
Posted on 2007-10-06
I am using the following FORM in my webpage.
<Form name=addreview method=POST action=savereview.jsp>
Title (less than 50 characters) <Input type=text size=50 name=title><Input type=submit value="Upload Review"><BR>
Review (less than 3500 characters)<BR><TextArea rows=35 cols=100 name=description> </TEXTAREA><BR>
if I place a single quote (') , double quote (") or dash/hyphen (-) in the textarea control and click submit I get funny characters being sent to my Tomcat 5.5 server. If I have the following script in a .jsp page I get the following results.
System.out.println (request.getParameter ("description").trim());
Hello, I?m Sharron, the last of the truly ?sick romantics? ? or so some of my be
st friends have dubbed me ? and frankly they?re absolutely right! But I?m also
passionate about food so think about that combination ? food and romance ? orgasmic! With this in mind, I?m on a constant quest to find a spot to dine in the very best of romantic settings with the very best of cuisine!
As you can see the apostrophe's are replace with something. Is there a way to get exactly what was entered?