From: Kris Jurka <books@ejurka.com>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: getTables() doesn't handle umlauts correctly
Date: Tue, 23 Nov 2010 03:13:42 -0500 (EST)
Message-ID: <alpine.BSO.2.00.1011230301020.26635@leary.csoft.net> (raw)
In-Reply-To: <icerif$7p2$1@dough.gmane.org>
References: <icc7cc$19a$1@dough.gmane.org>
<icdqc3$v7n$1@news.albasani.net>
<icdsfe$7j8$1@dough.gmane.org>
<AANLkTikcbX=9JD-R07fLa5YrHJc4yRbi-YP-mLsAC8_G@mail.gmail.com>
<4CEABC66.2010201@ttc-cmc.net>
<iceeib$7iu$1@dough.gmane.org>
<AANLkTingOB+gDrCtz4GDe5Z9x-gLfAOFk6U3d_FfKZOq@mail.gmail.com>
<icerif$7p2$1@dough.gmane.org>
On Mon, 22 Nov 2010, Thomas Kellerer wrote:
> What I find irritating is that I can run SELECT or INSERT statements against
> that table without problems.
>
> So the transmission of SQL Statements (through the Statement object) seems to
> be working with a different encoding...
As the discussion has shown, trying to determine who is at fault here is
not trivial. The best way to show that postgresql (driver or server if
you're seeing it in pgadmin too) is at fault is to create a test case
creating the table and then querying the metadata. It would be helpful to
use either a Java or PG escape code for the special character so it
doesn't get mangled by either mail clients or build environments. Then use
String.codePointAt to print out the actual data for both the table name
used for construction and returned by the metadata. That would
conclusively show that PG is at fault somewhere.
Something like this untested code:
void printString(String str) {
for (int i=0; i<str.length(); ) {
int cp = str.codePointAt(i);
System.out.print(" " + cp);
i += Character.charCount(cp);
}
System.out.println();
}
Kris Jurka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: books@ejurka.com, spam_eater@gmx.net
Subject: Re: getTables() doesn't handle umlauts correctly
In-Reply-To: <alpine.BSO.2.00.1011230301020.26635@leary.csoft.net>
References: <icc7cc$19a$1@dough.gmane.org> <icdqc3$v7n$1@news.albasani.net> <icdsfe$7j8$1@dough.gmane.org> <AANLkTikcbX=9JD-R07fLa5YrHJc4yRbi-YP-mLsAC8_G@mail.gmail.com> <4CEABC66.2010201@ttc-cmc.net> <iceeib$7iu$1@dough.gmane.org> <AANLkTingOB+gDrCtz4GDe5Z9x-gLfAOFk6U3d_FfKZOq@mail.gmail.com> <icerif$7p2$1@dough.gmane.org> <alpine.BSO.2.00.1011230301020.26635@leary.csoft.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox