From: | "Gunnar Giesinger" <mailinglists(at)gmx(dot)at> |
---|---|
To: | <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | German Special Chars (Umlaute) |
Date: | 2004-05-04 21:54:34 |
Message-ID: | 000001c43222$63b8f880$8600a8c0@johncleese |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
hi everybody!
I need to set up a database that should be able to contain values that
include German special chars (Umlauts like Ää...). I therefore
created a database with 'LATIN1' as character encoding.
Afterwards I tried to access a table containing only one character
varying field for test purposes via JDBC:
Class.forName("org.postgresql.Driver");
String url = "jdbc:postgresql://server:5432/umlaute";
Properties info = new Properties();
info.put("user", "usr");
info.put("password", "pw");
Connection con = DriverManager.getConnection(url, info);
Statement stmt = con.createStatement();
ResultSet rst = stmt.executeQuery("SELECT * FROM test");
rst.next();
System.out.println(rst.getString(1));
Everything works fine except instead of all the German special chars
strange symbols are displayed.
Does anybody know how to fix this problem?
Thanks
john
used system: PostgreSQL 7.3.4 on fedora core 1
MS Windows Client
various JDBC drivers tested
From | Date | Subject | |
---|---|---|---|
Next Message | Barry Lind | 2004-05-05 03:22:04 | Re: German Special Chars (Umlaute) |
Previous Message | Kris Jurka | 2004-05-04 17:35:10 | Re: Result Set Cursor Patch |