Hello,
I hope someone can help me.
I have a Problem with my Java-Application. I use jPMdbc to access my MYSQL-Database from my Java-Application.
It works fine with normal chars, but when I have special chars like ä, ö, ü, they are displayed wrong as boxes. I think its something with the encoding properties, but everything in the MySQL-DB is set to utf8_general_ci or utf8unicodeci.
The Problem only occurs when I read data from the db, if I enter umlauts into the Java-Programm they are written correctly into the Database.
Heres some example code for the DB-Access:
********************
Class.forName("de.root1.jpmdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:jpmdbc:http://myhost/jpmdbc.php?mydb", "user", "pw");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM XY");
JOptionPane.showMessageDialog(null,rs.getString("place"));
***********************
Any Idea what I can do?
Kind Regards,
Sebix
I hope someone can help me.
I have a Problem with my Java-Application. I use jPMdbc to access my MYSQL-Database from my Java-Application.
It works fine with normal chars, but when I have special chars like ä, ö, ü, they are displayed wrong as boxes. I think its something with the encoding properties, but everything in the MySQL-DB is set to utf8_general_ci or utf8unicodeci.
The Problem only occurs when I read data from the db, if I enter umlauts into the Java-Programm they are written correctly into the Database.
Heres some example code for the DB-Access:
********************
Class.forName("de.root1.jpmdbc.Driver");
Connection con = DriverManager.getConnection("jdbc:jpmdbc:http://myhost/jpmdbc.php?mydb", "user", "pw");
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery("SELECT * FROM XY");
JOptionPane.showMessageDialog(null,rs.getString("place"));
***********************
Any Idea what I can do?
Kind Regards,
Sebix