arabic encoding problem Connection Between mysql and java
807580May 21 2010 — edited May 22 2010i have problem i try to print arabic name from mysql
but it print it as ?????
and the same happen while i'm saving to database form textbox it appear in the db like this ?????
i add in the connection property encoding but i still have the same problem
i'm using jdbc /odbc
plz i need help
this is my code
--------------------------------------------------------------------------------
Properties prop = new Properties();
prop.put("user", "resa");
prop.put("password", "mypassword");
prop.put("useUnicode", "yes");
prop.put("characterEncoding", "UTF-8");
Connection con = DriverManager.getConnection("jdbc:odbc:resa",prop);
Statement stmt = con.createStatement();
String queryString = new String("select * from test_arab");
ResultSet rs = stmt.executeQuery(queryString);
while(rs.next())
{
int myId = rs.getInt("id");
String temp= rs.getString("arab_name");
System.out.println(new String(temp.getBytes("UTF-8")));
}
--------------------------------------------------------------------------------
thanks in advance