Re: Small problem with special characters - Mailing list pgsql-jdbc

From Thomas Kellerer
Subject Re: Small problem with special characters
Date
Msg-id eca2o4$4k7$1@sea.gmane.org
Whole thread Raw
In response to Re: Small problem with special characters  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Small problem with special characters  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Tom Lane wrote on 20.08.2006 17:46:
> Thomas Kellerer <spam_eater@gmx.net> 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



pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Small problem with special characters
Next
From: Kris Jurka
Date:
Subject: Re: Small problem with special characters