Thread: ERROR: conversion between UNICODE and LATIN1 is not supported

ERROR: conversion between UNICODE and LATIN1 is not supported

From
Troels Arvin
Date:
Hello,

I keep getting
  ERROR:  conversion between UNICODE and LATIN1 is not supported

when connecting from pgadmin3 beta 2 (checked out from CVS a little time
ago) to rather new checkout of PostgreSQL's CVS.

Is this a known problem/limitation?

--
Greetings from Troels Arvin, Copenhagen, Denmark


Re: ERROR: conversion between UNICODE and LATIN1

From
Andreas Pflug
Date:
Troels Arvin wrote:
> Hello,
>
> I keep getting
>   ERROR:  conversion between UNICODE and LATIN1 is not supported
>
> when connecting from pgadmin3 beta 2 (checked out from CVS a little time
> ago) to rather new checkout of PostgreSQL's CVS.
>
> Is this a known problem/limitation?

No. When does it fail? Enable sql logging for that.
We just had some changes in pgConn.cpp when connecting, but old
behaviour should have been preserved.

Regards,
Andreas


Re: ERROR: conversion between UNICODE and LATIN1

From
Troels Arvin
Date:
On Fri, 15 Oct 2004 09:46:04 +0000, Andreas Pflug wrote:

> When does it fail? Enable sql logging for that.

LOG:  connection received: host=127.0.0.1 port=36036
LOG:  connection authorized: user=troels database=template1
LOG:  statement: SELECT oid, pg_encoding_to_char(encoding) AS encoding, datlastsysoid
          FROM pg_database WHERE datname='template1'
LOG:  statement: set client_encoding to 'UNICODE'
ERROR:  conversion between UNICODE and LATIN1 is not supported

Output of "env | grep LANG":
LANG=en_US.iso88591

I have previously used pgadmin3 on this system with the same LANG setting
without problems, but that was with PostgreSQL 7.4.

--
Greetings from Troels Arvin, Copenhagen, Denmark


Re: ERROR: conversion between UNICODE and LATIN1

From
Andreas Pflug
Date:
Troels Arvin wrote:
> On Fri, 15 Oct 2004 09:46:04 +0000, Andreas Pflug wrote:
>
>
>>When does it fail? Enable sql logging for that.
>
>
> LOG:  connection received: host=127.0.0.1 port=36036
> LOG:  connection authorized: user=troels database=template1
> LOG:  statement: SELECT oid, pg_encoding_to_char(encoding) AS encoding, datlastsysoid
>           FROM pg_database WHERE datname='template1'
> LOG:  statement: set client_encoding to 'UNICODE'
> ERROR:  conversion between UNICODE and LATIN1 is not supported
>
> Output of "env | grep LANG":
> LANG=en_US.iso88591
>
> I have previously used pgadmin3 on this system with the same LANG setting
> without problems, but that was with PostgreSQL 7.4.

You're probably missing the appropriate conversions iso_8859_1_to_utf_8
and utf_8_to_iso_8859_1 (i.e. you probably dropped them). On a default
pgsql8, UNICODE<->LATIN1 is supported by default.

Regards,
Andreas