[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[List Home]
|
[eclipselink-users] Microsoft Access Encoding
|
- From: Stefan Teitge <stefan.teitge@xxxxxxxxx>
- Date: Tue, 20 Nov 2012 21:32:58 +0100
- Delivered-to: eclipselink-users@eclipse.org
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Mj3+VNn7ypnIkAOdtagpxQPXRHq/DxmNDJTo4fnDfSU=; b=M2asXuDKEH5+WrlxMTEI4MlFwHA7AVVD7ZTEstSXM5FaO68u1ok2+WTuTe2URUDff9 Gm9HJqkiq/GgFjhhZ7H0eyDUmFiLyyNOgnfShTfzrXfH6ZieREBYfymGa49+evbaBwVN QpfPW6Ke3lVNdoTkCqKPj9emFcWXspcgHfGn24YjDv+85vFsSOFY2MZ2iqw4qbKjmr4K KGH2P6KeThdIL6+zfGBbHZeIGUqLn+crg6iThwHEKq2LHlWqD7z5RjPaN7pEUpYMKpWe 6AMA5dbbS1rVRMy5zWOk0+aEaYJzJaYtMY5t5vAsr6O5QERbbWAXa+sDwJZf38hErncd 953A==
Hello!
I try to load data from a Microsoft Access Database in Windows 7.
I use EclipseLink JPA 2.4.1.
Map<String, String> props = new HashMap<String, String>();
props.put(PersistenceUnitProperties.JDBC_DRIVER, "sun.jdbc.odbc.JdbcOdbcDriver");
props.put(PersistenceUnitProperties.JDBC_URL, "jdbc:odbc:mydb");
props.put(PersistenceUnitProperties.TARGET_DATABASE, "org.eclipse.persistence.platform.database.AccessPlatform");
// is this parameter for JDBC-ODBC bridge used???
props.put("charSet", "iso-8859-1");
EntityManagerFactory emf = Persistence.createEntityManagerFactory("foo", props);
em = emf.createEntityManager();
If I query my database (e.g. em.find(StringTable.class, 7)) my text encoding is destroyed in string properties in the entity. Strings like "Müller" result in in Java string like "M?ller",
It is for sure an encoding issue. But at which point or using which property do I set the correct encoding for the Access Database?
Greets
Stefan Teitge