Java, jPMdbc & MySQL = Problems with umlauts (for example: ä, ü, ö)
Posted by: Sebastian Klute
Date: January 14, 2014 10:17AM

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

Options: ReplyQuote


Subject
Written By
Posted
Java, jPMdbc & MySQL = Problems with umlauts (for example: ä, ü, ö)
January 14, 2014 10:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.