Re: invalid byte sequence for encoding "UTF8": 0xff

From: "Albe Laurenz" <all(at)adv(dot)magwien(dot)gv(dot)at>
To: "Ashish Karalkar *EXTERN*" <ashish(dot)karalkar(at)info-spectrum(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: invalid byte sequence for encoding "UTF8": 0xff
Date: 2007-09-03 08:42:38
Message-ID: D960CB61B694CF459DCFB4B0128514C2297392@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ashish Karalkar wrote:
> I have a data script which runs fine from PgAdmin SQL
> Editor,but when I run this from command prompt I get
> following error:
>
>
> test=# \i /usr/local/pgsql/qsweb1/QSWEB_100_4_Default_Data.sql
>
> psql:/usr/local/pgsql/qsweb1/QSWEB_100_4_Default_Data.sql:1:
> ERROR: invalid byte sequence for encoding "UTF8": 0xff
> 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".
>
> can anybody suggest me what is going wrong.
> database encoding :UTF8
>
> PostgreSQL details:
>
> version
> --------------------------------------------------------------
> PostgreSQL 8.2.0 on i686-pc-linux-gnu, compiled by GCC gcc
> (GCC) 3.4.3 20041212 (Red Hat 3.4.3-9.EL4)

Can you tell us the following:

- What is the client operating system (where you run psql and
PgAdmin III)?
- What is the value of the environment variable PGCLIENTENCODING
set to on the client?
- What does the SQL command "show client_encoding;" return
when you issue it in
a) PgAdmin III
b) psql
- Please create a file that contains only the first line
of QSWEB_100_4_Default_Data.sql (I call it "l" in the following
commands), run the following two (Linux) commands on it:
a) od -t c l
b) od -t x1 l
and show us the output of both commands.

Yours,
Laurenz Albe

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rob Kirkbride 2007-09-03 08:48:07 Re: Data Warehousing
Previous Message Ow Mun Heng 2007-09-03 08:31:30 Instances where enable_seqscan = false is good