pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedUTF8 should be accepted as UNICODE
3+ messages / 3 participants
[nested] [flat]
* UTF8 should be accepted as UNICODE
@ 2008-02-22 14:08 Ivo Danihelka <ivo.danihelka@itonis.tv>
0 siblings, 1 reply; 3+ messages in thread
From: Ivo Danihelka @ 2008-02-22 14:08 UTC (permalink / raw)
To: pgsql-jdbc
The Postgresql JDBC driver does not accept this statement:
SET client_encoding = 'UTF8';
It fails with:
"org.postgresql.util.PSQLException: The server's client_encoding
parameter was changed to UTF8. The JDBC driver requires client_encoding
to be UNICODE for correct operation."
I consider that to be a bug. The UNICODE is an alias for UTF8.
Starting from 8.2, the pg_dump exports 'UTF8'
even when --encoding=UNICODE is used.
See:
$ pg_dump --version
pg_dump (PostgreSQL) 8.2.6
$ pg_dump --encoding=UNICODE template1 | grep client_encoding
SET client_encoding = 'UTF8';
The check for value.equals('UNICODE') is inside
org/postgresql/core/v3/QueryExecutorImpl.java
Thanks for the driver,
--
Ivo Danihelka
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: UTF8 should be accepted as UNICODE
@ 2008-02-22 14:21 Dave Cramer <pg@fastcrypt.com>
parent: Ivo Danihelka <ivo.danihelka@itonis.tv>
0 siblings, 1 reply; 3+ messages in thread
From: Dave Cramer @ 2008-02-22 14:21 UTC (permalink / raw)
To: Ivo Danihelka <ivo.danihelka@itonis.tv>; +Cc: pgsql-jdbc
Ivo,
What it's actually telling you is that you shouldn't attempt to change
it.
It's already set to UNICODE
But it should probably ignore your attempt, since it has no effect.
Dave
On 22-Feb-08, at 9:08 AM, Ivo Danihelka wrote:
> The Postgresql JDBC driver does not accept this statement:
> SET client_encoding = 'UTF8';
>
> It fails with:
> "org.postgresql.util.PSQLException: The server's client_encoding
> parameter was changed to UTF8. The JDBC driver requires
> client_encoding
> to be UNICODE for correct operation."
>
> I consider that to be a bug. The UNICODE is an alias for UTF8.
>
> Starting from 8.2, the pg_dump exports 'UTF8'
> even when --encoding=UNICODE is used.
> See:
> $ pg_dump --version
> pg_dump (PostgreSQL) 8.2.6
> $ pg_dump --encoding=UNICODE template1 | grep client_encoding
> SET client_encoding = 'UTF8';
>
>
> The check for value.equals('UNICODE') is inside
> org/postgresql/core/v3/QueryExecutorImpl.java
>
> Thanks for the driver,
> --
> Ivo Danihelka
>
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 6: explain analyze is your friend
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: UTF8 should be accepted as UNICODE
@ 2008-02-22 16:35 Kris Jurka <books@ejurka.com>
parent: Dave Cramer <pg@fastcrypt.com>
0 siblings, 0 replies; 3+ messages in thread
From: Kris Jurka @ 2008-02-22 16:35 UTC (permalink / raw)
To: Dave Cramer <pg@fastcrypt.com>; +Cc: Ivo Danihelka <ivo.danihelka@itonis.tv>; pgsql-jdbc
On Fri, 22 Feb 2008, Dave Cramer wrote:
> But it should probably ignore your attempt, since it has no effect.
>
The problem is that there are a lot of potential aliases to check, "SET
client_encoding = 'UTF -- 8'". We could try to normalize it and then
check it, but I don't think it's worth it.
Kris Jurka
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2008-02-22 16:35 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2008-02-22 14:08 UTF8 should be accepted as UNICODE Ivo Danihelka <ivo.danihelka@itonis.tv>
2008-02-22 14:21 ` Dave Cramer <pg@fastcrypt.com>
2008-02-22 16:35 ` Kris Jurka <books@ejurka.com>
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