X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id F3D8FD1C9CE for ; Tue, 5 Aug 2003 15:04:13 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 17170-01 for ; Tue, 5 Aug 2003 12:02:54 -0300 (ADT) Received: from fzkmail2.fzk.de (fzkmail2.fzk.de [141.52.27.52]) by svr1.postgresql.org (Postfix) with SMTP id 46AA2D1C932 for ; Tue, 5 Aug 2003 12:04:02 -0300 (ADT) Received: FROM resy5.fzk.de BY fzkmail2.fzk.de ; Tue Aug 05 17:04:00 2003 +0200 Received: œby rodos.fzk.de with ESMTP (8.8.6 (PHNE_17135)/8.7.1) id RAA09632; Tue, 5 Aug 2003 17:03:59 +0200 (METDST) Message-ID: <3F2FC75F.572CC891@rodos.fzk.de> Date: Tue, 05 Aug 2003 17:03:59 +0200 From: Christoph Haller X-Mailer: Mozilla 4.77 [en] (X11; U; HP-UX B.10.20 9000/780) X-Accept-Language: en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org, dzemik@venco.com.pl Subject: Re: unicode and libpq Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Amavis-Alert: BAD HEADER Non-encoded 8-bit data (char 9C hex) in message header 'Received' Received: \234by rodos.fzk.de... ^ X-Archive-Number: 200308/18 X-Sequence-Number: 4372 > > How can I put an UNICODE string with characters which code numbers I > know, ie. "0x00e9 0x00f1"? When I put that string to SQL query, > interpeter stops with the first 0x00 code. Any ideas? I have trying with > UNICODE and LATIN2 client_encoding. > From the subject of your message I assume you're using libpq. Within libpq you cannot deal with strings containing '\0' resp. 0x00 without processing them through PQescapeBytea. See 1.3.3. Escaping binary strings for inclusion in SQL queries HTH Regards, Christoph