Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id F0CE09F9AE7 for ; Mon, 3 Sep 2007 05:16:11 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 94128-09 for ; Mon, 3 Sep 2007 05:16:04 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from svana.org (svana.org [203.190.233.187]) by postgresql.org (Postfix) with ESMTP id CDEA79F9BAD for ; Mon, 3 Sep 2007 05:16:06 -0300 (ADT) Received: from kleptog by svana.org with local (Exim 4.50) id 1IS76C-0006A2-F9; Mon, 03 Sep 2007 18:15:56 +1000 Date: Mon, 3 Sep 2007 10:15:56 +0200 From: Martijn van Oosterhout To: Ashish Karalkar Cc: pgsql-general@postgresql.org Subject: Re: invalid byte sequence for encoding "UTF8": 0xff Message-ID: <20070903081556.GA20844@svana.org> Reply-To: Martijn van Oosterhout Mail-Followup-To: Ashish Karalkar , pgsql-general@postgresql.org References: <011d01c7ee01$7a0fc3e0$170211ac@LIONKING.COM> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline In-Reply-To: <011d01c7ee01$7a0fc3e0$170211ac@LIONKING.COM> X-PGP-Key-ID: Length=1024; ID=0x0DC67BE6 X-PGP-Key-Fingerprint: 295F A899 A81A 156D B522 48A7 6394 F08A 0DC6 7BE6 X-PGP-Key-URL: User-Agent: Mutt/1.5.9i X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: kleptog@svana.org X-SA-Exim-Scanned: No (on svana.org); SAEximRunCond expanded to false X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200709/51 X-Sequence-Number: 119975 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Sep 03, 2007 at 01:36:58PM +0530, Ashish Karalkar wrote: > Hello All, >=20 > 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=3D# \i /usr/local/pgsql/qsweb1/QSWEB_100_4_Default_Data.sql >=20 > psql:/usr/local/pgsql/qsweb1/QSWEB_100_4_Default_Data.sql:1: ERROR: inva= lid 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, --=20 Martijn van Oosterhout http://svana.org/kleptog/ > From each according to his ability. To each according to his ability to l= itigate. --ikeVEW9yuYc//A+q Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFG28K8IB7bNG8LQkwRAukkAJ4uMKZPz4UddK7HJ5WpCN/rPVn4GgCdEytO Owbc3ZmYldL+sa74ys/69X0= =UA4m -----END PGP SIGNATURE----- --ikeVEW9yuYc//A+q--