Palani
Palani

Reputation: 1921

single quote punctuation converted to question mark

I am doing application with strut1.2. In UI, in html text box i am have provided value with single quote punctuation but stored in DB as ? mark. So how to handle the same.

Ex: ‘torana’ becomes ?torana?. Please advise me on the same.

Thanks

Upvotes: 0

Views: 2651

Answers (1)

Naveen Kumar Yadav
Naveen Kumar Yadav

Reputation: 432

Before Inserting the text field value into the DB,Once check the textbox value using replaceAll method use like variable_name.replaceAll("\'","_sq_"); and then print that replaced string .If you entered ‘torana’ it need to change like _sq_torana_sq_ . Otherwise you are getting something else

Upvotes: 1

Related Questions