views:

97

answers:

1

Hi,

I use JExcel API to read excel file and then I stored them into an ArrayList. Then I insert them into a database. My array list contains cyrillic strings and the problem is these strings do not have inserted into database properly. As long as I have seen, other people can print out cyrillic strings into a standard output properly but I am not sure to how to store them in the collection. Any suggestions? Thanks

+1  A: 

Check that the strings are using the correct UNICODE characters for the cyrillic alphabet both before they go into the database and after they come out. If they go in wrong, you can't expect anything after that to work! If they go in right but come out wrong, your interface to the database is wrong and that's where you should fix. If they come out correct individually, then the problem is in how you're presenting the string to the presentation layer.

BTW, checking for cyrillic is just a matter of scanning through the string looking for characters in the range \u0410\u044f. That should be trivial to code up and ensure that it prints something you can examine easily.

Donal Fellows