-1
我已经在数据库中创建了一个由telugu数据组成的表格。当我尝试在java中使用eclipse检索泰卢固语数据时,我正在用矩形框出去。我们怎样才能看到没有矩形框的输出
代码:
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/sloka?useUnicode=yes&characterEncoding=UTF-8", "root", "");
st = con.createStatement();
} catch (Exception e) {
System.out.print("error:" + e);
}
public void getData() {
try {
String query = "select * from eesavyasa ";
rs = st.executeQuery(query);
System.out.print("records from database");
while (rs.next()) {
String name1 = new String(rs.getBytes("firstcolumn"), "UTF-8");
String name2 = new String(rs.getBytes("secondcolumn"), "UTF-8");
String name3 = new String(rs.getBytes("thirdcolumn"), "UTF-8");
String name4 = new String(rs.getBytes("fourthcolumn"), "UTF-8");
System.out.println(name1);
System.out.println(name2);
System.out.println(name3);
System.out.println(name4);
}
} catch (Exception ex) {
System.out.print(ex);
}
}
我们已经使用了整理UTF-8的数据库,表,为所有,但我们在矩形框 请回覆尽快
你的字体不支持Unicode的点... – MadProgrammer 2014-12-03 06:46:49
u能PLZ定义它恰恰 – edwin 2014-12-04 06:06:20
要显示的字符在您使用的字体中不可用,请更改字体... – MadProgrammer 2014-12-04 06:06:56