I have description field in my jsp page, when user enters some non ASCII characters as shown below :
This is user had entered the input string is :
"Hello ������� Hello" (without quotes)
When he edits for the first time without change anything in the the string and save, then it became :
"Hello Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã? Hello" (without quotes)
Then again one more time, it became :
"Hello Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â?Ã?Â? Hello" (without quotes)
Like wise it is getting increased its size. I'm saving the data to Oracle 10g database from jsp.
Please suggest what to do to rectify the problem.
Thanks & regards,
Achchayya
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35257
7
posted
0
Make sure that you the same encoding throughout the application - in the HTML form where the data is entered, during handling on the servlet container/app server, when storing it in the DB, and all the way back. UTF-8 would be a good candidate for the encoding (note that the encoding needs to be specified when creating the DB table, so if that's fixed already, you may have to use that encoding).