I want to read data from database. the data is in arabic language. the character set of my database is AL32UTF8.
when i try to retrive the data i get "????"
please do reply how to solve this problem
this is the code
public static void main(String[] args) {
// TODO Auto-generated method stub
String url = "jdbc:oracle:thin:@localhost:1521:xe";
String username = "hr";
String password = "hr";
String sql = "SELECT WORDS_URDU FROM FINALLY WHERE DFFGG=430";
Connection connection;
try {
connection = DriverManager.getConnection(url, username, password);
Statement statement = connection.createStatement();
ResultSet rs = statement.executeQuery(sql);
while(rs.next())
{
System.out.println(rs.getString(1));
}
//System.out.println(statement.execute(sql));
connection.close();
} catch (SQLException e) {
System.err.println(e);
}
}