pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martijn van Oosterhout <kleptog@svana.org>
To: Ashish Karalkar <ashish.karalkar@info-spectrum.com>
Cc: pgsql-general@postgresql.org
Subject: Re: invalid byte sequence for encoding "UTF8": 0xff
Date: Mon, 3 Sep 2007 10:15:56 +0200
Message-ID: <20070903081556.GA20844@svana.org> (raw)
In-Reply-To: <011d01c7ee01$7a0fc3e0$170211ac@LIONKING.COM>
References: <011d01c7ee01$7a0fc3e0$170211ac@LIONKING.COM>

On Mon, Sep 03, 2007 at 01:36:58PM +0530, Ashish Karalkar wrote:
> Hello All,
> 
> 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 byt
> e sequence for encoding "UTF8": 0xff
> HINT:  This error can also happen if the byte sequence does not match the encodi
> ng expected by the server, which is controlled by "client_encoding".

Well, the error is correct, that's not a valid UTF-8 character. I seem
to remember someone saying that ooasionally windows puts BOMs in UTF-8
files (which is completely bogus). Check the file using a simple text
editor a check if there are some odd characters at the beginning of the
file.

Have a ncie day,
-- 
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (18+ messages)  latest in thread

Message-ID: <20070903081556.GA20844@svana.org>
Permalink:  ../20070903081556.GA20844@svana.org/
Also on:    postgresql.org/message-id/20070903081556.GA20844@svana.org

 · 

reply

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-general@postgresql.org
  Cc: kleptog@svana.org, ashish.karalkar@info-spectrum.com
  Subject: Re: invalid byte sequence for encoding "UTF8": 0xff
  In-Reply-To: <20070903081556.GA20844@svana.org>
  References: <011d01c7ee01$7a0fc3e0$170211ac@LIONKING.COM> <20070903081556.GA20844@svana.org>

* 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