I am trying to persist Arabic characters into Oracle 11g Database. When I persist Arabic strings they persist successfully but, in the database they appear as question marks ???????.
I searched and found that problem might be with database encoding, but I think that might not be true as I am able to write Arabic strings from SQLDeveloper and commit DB, it displays correctly within DB table. Also when I retrieve that field and display it on screen, it displays correctly.
So from this I concluded that DB recognizes Arabic and there is no problem there. I tried setting Client/Server region language settings still did not fix the problem.
After reading this post and trying its suggestions, I found that problem might be with persistence layer, that it does not handle Arabic characters properly. What is the solution to this?
I am not sure if this is a redundant question but I am desperate. Any help/advice is appreciated.
Systems I am using:
Server: Oracle Thin 11g
IDE: IBM WebSphere Integration Developer with JSF 1.2
Note: Still a beginner.
EDIT
Insert code:
String a = "اشتغل";
byte[] b = a.getBytes("UTF-8");
String c = new String(b,"UTF-8");
localLgInst.setBdStatus(c);
System.out.println("status " + localLgInst.getBdStatus());
entityManager.persist(localLgInst);
entityManager.flush();
localLgInst is an instance of an entity. Currently I am putting the string hard coded. System out prints the string in console of IDE but also ???????.