Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id E13069F947D for ; Mon, 3 Sep 2007 07:48:00 -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 27628-01 for ; Mon, 3 Sep 2007 07:47:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from pro33.abac.com (pro33.abac.com [66.226.64.34]) by postgresql.org (Postfix) with ESMTP id 11A769F948F for ; Mon, 3 Sep 2007 07:47:55 -0300 (ADT) Received: from ashishk ([203.193.139.178]) (authenticated bits=0) by pro33.abac.com (8.14.1/8.14.1) with ESMTP id l83AlfVp034123 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 3 Sep 2007 03:47:45 -0700 (PDT) (envelope-from ashish.karalkar@info-spectrum.com) Message-ID: <001f01c7ee17$e05eb4b0$170211ac@LIONKING.COM> From: "Ashish Karalkar" To: "Albe Laurenz" Cc: Subject: Re: invalid byte sequence for encoding "UTF8": 0xff Date: Mon, 3 Sep 2007 16:17:31 +0530 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.982 tagged_above=0 required=5 tests=AWL=-0.845, BAYES_40=-0.185, FAKE_REPLY_C=2.012 X-Spam-Level: X-Archive-Number: 200709/58 X-Sequence-Number: 119982 ----- Original Message ----- From: "Ashish Karalkar" To: "Albe Laurenz" Sent: Monday, September 03, 2007 4:09 PM Subject: Re: [GENERAL] invalid byte sequence for encoding "UTF8": 0xff > > ----- Original Message ----- > From: "Albe Laurenz" > To: "Ashish Karalkar *EXTERN*" ; > > Sent: Monday, September 03, 2007 2:12 PM > Subject: Re: [GENERAL] invalid byte sequence for encoding "UTF8": 0xff > > > 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: > > Please find my answer below > > - What is the client operating system (where you run psql and > PgAdmin III)? > > Its Windows XP - PgAdmin III > RHEL 3.4.3-9.EL4-psql (Server Machine) > > > - What is the value of the environment variable PGCLIENTENCODING > set to on the client? > PGCLIENTENCODING is not set and as per documantation I think by default it > takes value of database i.e. UTF8 > > - What does the SQL command "show client_encoding;" return > when you issue it in > a) PgAdmin III > UNICODE > b) psql > UTF8 > > - 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. > > > [root@localhost qsweb]# od -t c test.sql > 0000000 \ s e t O N _ E R R O R _ S T > 0000020 O P > 0000022 > [root@localhost qsweb]# od -t x1 test.sql > 0000000 5c 73 65 74 20 4f 4e 5f 45 52 52 4f 52 5f 53 54 > 0000020 4f 50 > 0000022 > [root@localhost qsweb]# > > Thanks Albe for your replay. > here is the data you wanted > > > Yours, > Laurenz Albe > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Have you searched our list archives? > > http://archives.postgresql.org/