X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 20999D1CA32 for ; Wed, 5 May 2004 00:23:58 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 41976-08 for ; Wed, 5 May 2004 00:23:36 -0300 (ADT) Received: from NSNOVPS00411.nacio.xythos.com (212-59.84.64.master-link.com [64.84.59.212]) by svr1.postgresql.org (Postfix) with ESMTP id 55B65D1E5F7 for ; Wed, 5 May 2004 00:23:35 -0300 (ADT) Received: from xythos.com ([66.166.17.184]) by NSNOVPS00411.nacio.xythos.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 4 May 2004 20:22:04 -0700 Message-ID: <40985DDC.9090601@xythos.com> Date: Tue, 04 May 2004 20:22:04 -0700 From: Barry Lind User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en, ja MIME-Version: 1.0 To: Gunnar Giesinger Cc: pgsql-jdbc@postgresql.org Subject: Re: German Special Chars (Umlaute) References: <000001c43222$63b8f880$8600a8c0@johncleese> In-Reply-To: <000001c43222$63b8f880$8600a8c0@johncleese> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 05 May 2004 03:22:04.0730 (UTC) FILETIME=[237BB9A0:01C43250] X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200405/8 X-Sequence-Number: 10018 Gunnar, There are a variety of things that could be going wrong. But I would first suspect the fact that you didn't specify what character set to use in your System.out.println() calls. Because you didn't specify, java will use its default which may or may not be what you want. You also don't show how you are getting the data into this table, so the problem may be that the data is corrupted while being inserted. --Barry Gunnar Giesinger wrote: > 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 > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: the planner will ignore your desire to choose an index scan if your > joining column's datatypes do not match