Arabic data is converting into ???? when java program queries xml payload from Oracle Table using Select statement

Venkat :

Arabic data is converting into ???? when java program queries xml payload from Oracle Table using Select statement

I have written a JDBC program to query xml type payload from Oracle table using Select statement. Few XML elements in the payload contains like FirstName, LastName etc. contains Arabic Characters. When i run my program, Select query returning the xml payload but the elements which having arabic characters are converting into ????. I am not sure why it is happening like this. is any one have solution for this problem?

Thanks in Advance.

Wassim Al Ahmad :

I experienced this problem with java and mysql on eclipse the solution was From eclipse click right on your project and choose properties and choose utf-8 like this photo

enter image description here

Then from the database chose base encoding and utf-8 tables.

Finally, all database queries must be utf-8 encoded like this

String url = "jdbc:mysql://host/database?useUnicode=true&characterEncoding=utf8";

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=140962&siteId=1