X-Original-To: pgsql-bugs-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 858E4D1B56F; Wed, 29 Oct 2003 18:33:44 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 75693-06; Wed, 29 Oct 2003 14:33:13 -0400 (AST) Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by svr1.postgresql.org (Postfix) with ESMTP id 776ECD1B545; Wed, 29 Oct 2003 14:33:12 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.10/8.12.10) with ESMTP id h9TIX9it015957; Wed, 29 Oct 2003 13:33:09 -0500 (EST) To: ljb Cc: pgsql-bugs@postgresql.org, pgsql-interfaces@postgresql.org Subject: Re: pgtcl large object read/write corrupts binary data In-reply-to: References: Comments: In-reply-to ljb message dated "Mon, 27 Oct 2003 02:33:58 +0000" Date: Wed, 29 Oct 2003 13:33:09 -0500 Message-ID: <15956.1067452389@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200310/174 X-Sequence-Number: 7023 ljb writes: > [Using PostgreSQL-7.3.4 and -7.4beta5, Tcl-8.4.x.] > Binary data written to a Large Object with libpgtcl's pg_lo_write is > corrupted. Tcl is mangling the data - something to do with UTF-8 > conversion. Example: 0x80 becomes 0xc2 0x80, and 0xff becomes 0xc3 0xbf. > ... > Proposed Patch: (I think this requires Tcl >= 8.1) Yeah, it appears that ByteArrayObj was added in Tcl 8.1. We were already requiring Tcl 8.0 of course. Does anyone think that it's important to continue support for Tcl 8.0.* in libpgtcl? regards, tom lane