Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Oscar Montgomery   on Aug 18 In Java Category.

  
Question Answered By: Javairea Akram   on Aug 18

It's a good practice (not only for this problem  but everywhere) to try removing all the unwanted parameters for solving a problem. Don't try many things together. By this, you will exactly go to the point. For example, first you make sure that your database is functioning properly. The following can be a way to verify this:

1. What is your database? Does it support UTF properly?
2. Did you check your database manually to check how to save a farsi text  in the?
3. What SQL queries are you using to enter or update the data in your java application? Try the same queries by your database sql editor (eg. Query Analyzer) and check the result.

Then, try to run a very minimized java program which saves a hard-coded farsi text to your database (not a text from user input). This will help you to find out many details about what you are trying to do. For example, if you aim to have some UTF Farsi text in a .properties file but save it in ANSI, it may return junk data. Or if you have a jsp file to display farsi data and it's not saved in UFT-8 format, even if you have correct data from the persistent layer, the data will not come correctly. These details are very important.

At the end, when all the details are true, try everything with your framework. Now, you have only one parameter left that is the Webwork (or wathever). You will not be confused any more about the place that causes your problem.

Share: