Re: ERROR: invalid byte sequence from psql - Works perfectly from pgAdmin III query window

From: Richard Huxton <dev(at)archonet(dot)com>
To: Anoo Sivadasan Pillai <aspillai(at)in(dot)rm(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ERROR: invalid byte sequence from psql - Works perfectly from pgAdmin III query window
Date: 2007-10-01 10:12:20
Message-ID: 4700C804.3000904@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Anoo Sivadasan Pillai wrote:
> Why the Fun_ABC1 is created and Fun_ABC12 is raising the following
> error, while run through psql, ( I Could create both the functions from
> PgAdmin III query )
>
> ERROR: invalid byte sequence for encoding "UTF8": 0x93
>
> HINT: This error can also happen if the byte sequence does not match
> the encoding expected by the server, which is controlled by
> "client_encoding".

Check your "client_encoding" setting in psql perhaps?

Presumably the text-file contains non-UTF8 characters but the
client_encoding says UTF8. Copying+pasting into pgAdmin is probably
translating for you.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Magnus Hagander 2007-10-01 10:32:47 Re: windows and pg 8.2 (change database to another server)
Previous Message Albe Laurenz 2007-10-01 10:05:18 Re: more problems with count(*) on large table