X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AD7B3329F39 for ; Wed, 13 Oct 2004 19:00:35 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 82148-01 for ; Wed, 13 Oct 2004 18:00:27 +0000 (GMT) Received: from mproxy.gmail.com (mproxy.gmail.com [216.239.56.250]) by svr1.postgresql.org (Postfix) with ESMTP id CF4EB329F19 for ; Wed, 13 Oct 2004 19:00:26 +0100 (BST) Received: by mproxy.gmail.com with SMTP id x71so176508cwb for ; Wed, 13 Oct 2004 11:00:26 -0700 (PDT) Received: by 10.11.120.57 with SMTP id s57mr233132cwc; Wed, 13 Oct 2004 11:00:26 -0700 (PDT) Received: by 10.11.100.56 with HTTP; Wed, 13 Oct 2004 11:00:26 -0700 (PDT) Message-ID: <7d68b7e304101311007923fb7f@mail.gmail.com> Date: Wed, 13 Oct 2004 19:00:26 +0100 From: Andrew Sykes Reply-To: Andrew Sykes To: pgsql-jdbc@postgresql.org Subject: odd insert problem, textarea \n replaced with
gives ^M ! Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=HTML_MESSAGE X-Spam-Level: X-Archive-Number: 200410/122 X-Sequence-Number: 11227 Hey there, I'm having a few issues with JDBC; i'm using the JDBC2 driver with Postgresql 7.3 on Gentoo. I've got a textarea in a JSP page, and I'm replacing the newline characters in the box with
using a regular expression. When I output the result of this to the page as a test, everything looks fine (i.e.
's in the page source). I pass this String to a method of a bean that does the inserting into the DB, and it appears to work fine; but when I use pgsql to check, I see that the
bit of the string has been replaced by a number of highlighted ^M characters. The database encoding is SQL_ASCII. Any idea what's going on?