Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 4B112164F46 for ; Sun, 15 Apr 2012 02:33:24 -0300 (ADT) Received: from mail-pb0-f46.google.com ([209.85.160.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SJI5I-0007F3-GB for pgsql-admin@postgresql.org; Sun, 15 Apr 2012 05:33:15 +0000 Received: by pbcun15 with SMTP id un15so5092204pbc.19 for ; Sat, 14 Apr 2012 22:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=uv3cgqNaFmNW8dinA6rKTzysejJQR+4XQe4PLoIaT5s=; b=pC3m+DRPzFFyJkU/R/BHnoEK7NBNUsXPEega0BHMakdJjqwPkbxRiEyxeSdzq2V3NU 17RttGATfSwO1xy6gzG8WNY0XYyVwRYjVfaa6yBKBX30f81PQSNc04YqGL+Unxarce98 yEuR76ehOyhvViZ2WO1E9kYdCD1kLN5i5NwRrlMbZmU1SWXLC3N5mxvOGPo4FH0+hfol 3FDo13pugUA6400oHg2AgTXGUziGslhmHdVgeDupVOQoyFj5bYL6rI2G56HP5npvW1PJ hDQ6PjZNQw/rSzCZxPtvFJcikH88vIG5MIRGEYJSBbGJXQSQ1c9hI6v18VueLRnfWs6G 2oEA== Received: by 10.68.194.1 with SMTP id hs1mr17665644pbc.6.1334467979454; Sat, 14 Apr 2012 22:32:59 -0700 (PDT) Received: from [192.168.11.3] ([114.95.165.117]) by mx.google.com with ESMTPS id pj1sm13739898pbc.44.2012.04.14.22.32.56 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 14 Apr 2012 22:32:58 -0700 (PDT) Message-ID: <4F8A5D85.4000808@gmail.com> Date: Sun, 15 Apr 2012 13:32:53 +0800 From: Rural Hunter User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120327 Thunderbird/11.0.1 MIME-Version: 1.0 To: "pgsql-admin@postgresql.org" Subject: Re: invalid byte sequence for encoding "UTF8": 0xf481 - how could this happen? References: <4F88DB40.9070609@gmail.com> <4F88F684.3030405@gmail.com> In-Reply-To: Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/74 X-Sequence-Number: 39410 still doesn't work.
db=# set client_encoding='SQL_ASCII' ;
SET
db=# select to_tsvector(content) from tmp_article;
ERROR:  invalid byte sequence for encoding "UTF8": 0xf481


于 2012/4/15 1:38, raghu ram 写道:


On Sat, Apr 14, 2012 at 9:31 AM, Rural Hunter <ruralhunter@gmail.com> wrote:
doesn't work either.

db=# show client_encoding;
 client_encoding
-----------------
 UTF8
(1 row)

db=# set client_encoding='LATIN1';
SET
db=# show client_encoding;
 client_encoding
-----------------
 LATIN1
(1 row)

db=# select to_tsvector(content) from tmp_article;

ERROR:  invalid byte sequence for encoding "UTF8": 0xf481

Try to set client_encoding='SQL_ASCII' 

and then execute 

select to_tsvector(content) from tmp_article;

--

Thanks & Regards,

Raghu Ram

EnterpriseDB: http://www.enterprisedb.com