I have some non-standard characters in my Access 2010 database. When I read them via
Connection con = null;
try{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
java.util.Properties prop = new java.util.Properties();
prop.put("charSet", "UTF8");
String database = "jdbc:odbc:Lb";
con = DriverManager.getConnection(database, prop);
} catch (Exception ex) {
System.out.println("Error");
}
Statement stm = conn.createStatement();
ResultSet rs = stm.executeQuery("SELECT distinct forename, surname from PSN where isValid");
while (rs.next()) {
String forename = rs.getString("forename");
}
I receive question marks (?
) where the character should be. Why is this?