Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 011D79FB633 for ; Tue, 20 Feb 2007 07:49:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 53239-10 for ; Tue, 20 Feb 2007 07:49:55 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 266949FA2EC for ; Tue, 20 Feb 2007 07:49:54 -0400 (AST) Received: from [219.89.217.179] (helo=[10.1.1.3]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1HJTVI-0000Gl-3G; Wed, 21 Feb 2007 00:49:52 +1300 Message-ID: <45DAE076.1060407@opencloud.com> Date: Wed, 21 Feb 2007 00:50:14 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 0.8 (Windows/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: James Im CC: pgsql-jdbc@postgresql.org Subject: Re: invalid byte sequence for encoding "UTF8": 0x00 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Broken-Reverse-DNS: no host name found for IP address 219.89.217.179 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL, BAYES_50 X-Spam-Level: X-Archive-Number: 200702/107 X-Sequence-Number: 16663 James Im wrote: > I've got another problem. I sometimes get the following SQLException > when doing an insert: > > ERROR: invalid byte sequence for encoding "UTF8": 0x00 You're trying to insert a string which contains a '\0' character. The server can't handle strings containing embedded NULs, as it uses C-style string termination internally. -O