Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all articles
Browse latest Browse all 884

Java, jPMdbc & MySQL = Problems with umlauts (for example: ä, ü, ö) (no replies)

$
0
0
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

Viewing all articles
Browse latest Browse all 884

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>