Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 3CFCA1927EA3 for ; Fri, 13 Apr 2012 23:05:07 -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 1SIsML-0007a6-Os for pgsql-admin@postgresql.org; Sat, 14 Apr 2012 02:05:06 +0000 Received: by pbcun15 with SMTP id un15so4225605pbc.19 for ; Fri, 13 Apr 2012 19:04:53 -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 :content-type:content-transfer-encoding; bh=g+rhMT5W6ORdGcNjcqvyOaB7TS3vfDizXEc7F4Ezmhk=; b=ah78qC3uI3gAx7KMjViuYAmuL7E+W+nolFcqYj0ZMdjPH4vr0L7XvlEjDu36gdA+WH joMK9pQwzNN8YX36DPXi9Cmymdcwv+HY6m1eRv+30kNubPFQjJzz8VpLDIaim7bZSvBB yE+jgfYBxG5oavOPF377Cxvd/5prvlRPj8dLkThB4RebMmc0G527ulktO2SVd0M9m8jc w2LngVQG4C3yC3D0SZTALnJtRqtQP4QVvxf8WEgyNXBeRaGJpPQL9+31fGwdrHKyEn0l bcTiml9QTf/vPfUljIaRUOSVqvW828QE2IGy8wCKQSDb7sA/q1HXI6H7eNKm8tw487dr 3ISg== Received: by 10.68.221.136 with SMTP id qe8mr9114184pbc.108.1334369093151; Fri, 13 Apr 2012 19:04:53 -0700 (PDT) Received: from [192.168.11.3] ([114.95.165.117]) by mx.google.com with ESMTPS id qb8sm656575pbb.12.2012.04.13.19.04.50 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Apr 2012 19:04:52 -0700 (PDT) Message-ID: <4F88DB40.9070609@gmail.com> Date: Sat, 14 Apr 2012 10:04:48 +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: invalid byte sequence for encoding "UTF8": 0xf481 - how could this happen? Content-Type: text/plain; charset=GB18030; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201204/67 X-Sequence-Number: 39403 My db is in utf-8, I have a row in my table say tmp_article and I wanted to generate ts_vector from the article content: select to_tsvector(content) from tmp_article; But I got this error: ERROR: invalid byte sequence for encoding "UTF8": 0xf481 I am wondering how this could happen. I think if there was invalid UTF8 bytes in the content, it shouldn't have been able to inserted into the tmp_article table as I sometimes see similar errors when inserting records to tmp_article. Am I right?