This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes how to specify arabic encoding in jndi Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to specify arabic encoding in jndi" Watch "how to specify arabic encoding in jndi" New topic
Author

how to specify arabic encoding in jndi

anitha meena
Ranch Hand

Joined: Oct 22, 2007
Posts: 40
Dear All,

I configured the java application to read the database configuration from jndi
I have some arabic data in the database so i have to specify the unicode as well as characterEncoding , i have made the below




but am getting error Cannot connect to DB,


it works if i change the above to the following




but the arabic text will apear in a form of question marks (???)


can you let me know how to fix that , i mean how to specify the type of characterEncodning in the jndi

this is my jndi contents


Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37890
    
  22
Which operating system are you using? Windows only displays a restricted range of characters at the command line.

This is more difficult a question than we usually see on beginner's; since it is probably more about displays than databases, I shall move you to the intermediate forum.
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874

Anitha,


Try setting the useEncoding and characterEncoding properties inside <connection-property> rather than in the connection-url. Ihvn't tried it. check it.

 
Consider Paul's rocket mass heater.
 
subject: how to specify arabic encoding in jndi
 
Similar Threads
Error while starting jboss(java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.j)
JPA,/mysql/JBoss and a big head ache
GenericJDBCException: Cannot open connection
Strange Persistence Unit deployment error in JBoss 6
JBoss DBCP