X-Original-To: pgsql-sql@postgresql.org Received: from spampd.localdomain (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 1EAAE47638C for ; Tue, 13 May 2003 17:21:09 -0400 (EDT) Received: from localhost.localdomain (unknown [66.239.202.254]) by postgresql.org (Postfix) with ESMTP id 67F0D4763BA for ; Tue, 13 May 2003 17:21:07 -0400 (EDT) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by localhost.localdomain (8.11.6/8.11.6) with ESMTP id h4DHIrN04432; Tue, 13 May 2003 17:18:53 GMT Subject: insert problem with special characters From: jwang To: pgsql-sql@postgresql.org Cc: "john.wang@popmanager.com" Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 13 May 2003 17:18:52 +0000 Message-Id: <1052846333.1815.47.camel@localhost> Mime-Version: 1.0 X-Spam-Status: No, hits=-9.4 required=5.0 tests=BAYES_20,USER_AGENT_XIMIAN autolearn=ham version=2.50 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.50 (1.173-2003-02-20-exp) X-Archive-Number: 200305/269 X-Sequence-Number: 13434 Hi All, I have a web application in JSP/Servlet/PostgreSQL(7.3). I have a text input field where users can enter special cent symbol to represent cent unit just like dollar symbol. So I have to use java.net.URLDecoder.encode(text_input,"UTF-8") to fetch the request input on the server. If I just insert the encoding text into the database, it will store the text in URL-encoding format. But I want to store text in ASCII-readable format (and cent symbol is stored just like dollar symbol), rather then in URL-encoding format. If I am using java.net.URLDecoder.decode(text_input,"UTF-8") to decode the text before I do inserting, the cent symbol is stored as a question mark symbol in database. I tried to find a postgres encoding function without success. Does anyone know what the problem is and how to solve it? Thanks a lot. -John GSP Marketing Technologies, Inc. john.wang@popmanager.com