X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AAA0D9FB261 for ; Sun, 20 Aug 2006 13:31:45 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 35902-08 for ; Sun, 20 Aug 2006 16:31:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by postgresql.org (Postfix) with ESMTP id 0EDCD9FA432 for ; Sun, 20 Aug 2006 13:31:32 -0300 (ADT) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1GEqCi-00018L-GY for pgsql-jdbc@postgresql.org; Sun, 20 Aug 2006 18:31:16 +0200 Received: from ppp-82-135-84-228.dynamic.mnet-online.de ([82.135.84.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Aug 2006 18:31:16 +0200 Received: from spam_eater by ppp-82-135-84-228.dynamic.mnet-online.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 20 Aug 2006 18:31:16 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-jdbc@postgresql.org From: Thomas Kellerer Subject: Re: Small problem with special characters Date: Sun, 20 Aug 2006 18:31:00 +0200 Lines: 30 Message-ID: References: <27533.1156088781@sss.pgh.pa.us> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: ppp-82-135-84-228.dynamic.mnet-online.de User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de; rv:1.8.0.5) Gecko/20060719 Thunderbird/1.5.0.5 Mnenhy/0.7.4.0 In-Reply-To: <27533.1156088781@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200608/83 X-Sequence-Number: 15610 Tom Lane wrote on 20.08.2006 17:46: > Thomas Kellerer writes: >> character 0xc3b6 of encoding "UTF8" has no equivalent in "WIN1251" [SQL >> State=22P05] > > Indeed, that's what the conversion table embedded in the backend > thinks. Some cursory poking about in src/backend/utils/mb/Unicode/ > says that we derive these tables mechanically from authoritative data > at ftp://www.unicode.org/Public/MAPPINGS/ ... so maybe you need to > take this up with them. What's your basis for asserting that this > character exists in code page 1251? Well the 0xc3b6 does obviously _not_ exist in the Windows codepage (as it is a 2byte character). But this is a "regular" umlaut (ö) that (from a "visual" point of view) does exist in the codepage. Obviously from within Java I do not have the chance to work with anything else than UTF (I think Java internally uses some kind of UTF-16 flavor). So how would I get this character into the table from within a Java program? Don't get me wrong: I do understand the technical background, and I can happily use an UTF8 database. So I don't really have an issue with this. I'm just wondering: how would someone who is forced to use a win1251 database together with Java would succeed in inserting umlauts into the database? Cheers Thomas