X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 68DFF32A176 for ; Tue, 5 Oct 2004 14:55:28 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13631-02 for ; Tue, 5 Oct 2004 13:55:19 +0000 (GMT) Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by svr1.postgresql.org (Postfix) with SMTP id B2C98329ECA for ; Tue, 5 Oct 2004 14:55:21 +0100 (BST) Received: (qmail 7708 invoked from network); 5 Oct 2004 13:56:14 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.36?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 5 Oct 2004 13:56:14 -0000 Subject: Re: Mangled accented characters From: Dave Cramer Reply-To: pg@fastcrypt.com To: Yamir Encarnacion Cc: "pgsql-jdbc@postgresql.org" In-Reply-To: <20041004235433.86666.qmail@web52303.mail.yahoo.com> References: <20041004235433.86666.qmail@web52303.mail.yahoo.com> Content-Type: text/plain Organization: Cramer Consulting Message-Id: <1096984521.1678.211.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 05 Oct 2004 09:55:21 -0400 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200410/11 X-Sequence-Number: 11116 Yamir, You should review the archives looking for encoding unicode. The short version is that internally java uses unicode, and so does the driver. Dave On Mon, 2004-10-04 at 19:54, Yamir Encarnacion wrote: > I am having a problem with my accented characters > getting mangled. > Here is a snippet of the code I ran to reproduce the > problem > >>>Code starts > Connection con = > DriverManager.getConnection(url, user, pwd); > query = "INSERT INTO container (catparent, > catid, position, catname, cattype) values (2, 1, 1, > 'Educacin', 0)"; > stmt = con.createStatement(); > stmt.execute(query); > con.close(); > << > > My database is encoded using LATIN1 > List of databases > Name | Owner | Encoding > directory | dpr | LATIN1 > > When I do a Select using psql for the row above I get > the following: > > > catid | catname | catparent | position | cattype | > description | keywords > -------+-----------+-----------+----------+---------+-------------+---------- > 1 | Educacin | 2 | 1 | 0 | > | > > Could someone explain to me how to insert Educacin > as Educacin instead of as Educacin. Thank you. > > Yamir > > > > __________________________________ > Do you Yahoo!? > Yahoo! Mail - 50x more storage than other providers! > http://promotions.yahoo.com/new_mail > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster -- Dave Cramer 519 939 0336 ICQ # 14675561 www.postgresintl.com