Here what I know about these kind of problems in SQL server and I hope it helps:
- The data types should be nvarachar or ntext to accept Unicode as input.
- I think the manager environment put Arabic 1256 for farsi characters.
- There is a parameter in jdbc connection parameters that should be set for Unicode reading and writing. (check it your jdbc driver documentation its driver specific)