X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id DF8E09DC845 for ; Fri, 24 Mar 2006 05:21:32 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 59288-04 for ; Fri, 24 Mar 2006 05:21:33 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 260629DC804 for ; Fri, 24 Mar 2006 05:21:29 -0400 (AST) Received: (qmail 14443 invoked from network); 24 Mar 2006 18:21:30 +0900 Received: from unknown (HELO ?100.0.32.254?) (100.0.32.254) by sd2.tpf-fw-c.co.jp with SMTP; 24 Mar 2006 18:21:30 +0900 Message-ID: <4423BA00.5010406@tpf.co.jp> Date: Fri, 24 Mar 2006 18:21:04 +0900 From: Hiroshi Inoue User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: ja, en-us, en MIME-Version: 1.0 To: =?ISO-8859-1?Q?=C5smund_Kveim_Lie?= CC: "pgsql-odbc@postgresql.org" Subject: Re: MaxLongVarChar and new lines in text References: <4422C6BA.60209@nosyko.no> In-Reply-To: <4422C6BA.60209@nosyko.no> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=1.909 required=5 tests=[AWL=0.098, RCVD_IN_WHOIS_BOGONS=1.811] X-Spam-Score: 1.909 X-Spam-Level: * X-Archive-Number: 200603/163 X-Sequence-Number: 7449 Åsmund Kveim Lie wrote: > Hi, > > I'm having a problem with line breaks and the MaxLongVarChar setting. > I'm using Postgrsql 8.1.3 and ODBC version 08.01.0200(ansi). When I set > MaxLongVarChar <= 16383 it gives different results than using > MaxLongVarChar > 16383 or MaxLongVarChar = -4 (which is no limit). I > insert a newline in the db like this: INSERT INTO test VALUES ('\n'); > and then retrieve it from my odbc app and write the result to a file. > CommLogs and result files are attached. > > When using a small MaxLongVarChar value the result is (in hex) 0a0d (new > line, carriage teturn). For large MaxLongVarChar its 000a (new line > only). Any Windows app requires both new line and carriage return to > display new line correct. Any reason why this should differ when using > bigger values in MaxLongVarChar? We use the LF<->CR/LF conversion on. Just a confirmation. Aren't you setting MaxVarChar not MaxLongVarChar ? regards, Hiroshi Inoue