insert problem with special characters

From: jwang <john(dot)wang(at)popmanager(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Cc: "john(dot)wang(at)popmanager(dot)com" <john(dot)wang(at)popmanager(dot)com>
Subject: insert problem with special characters
Date: 2003-05-13 17:18:52
Message-ID: 1052846333.1815.47.camel@localhost
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc pgsql-sql

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(dot)wang(at)popmanager(dot)com

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Randall Lucas 2003-05-14 15:43:41 Re: [SQL] insert problem with special characters
Previous Message anon permutation 2003-05-13 05:54:49 Re: Strange column naming problem

Browse pgsql-sql by date

  From Date Subject
Next Message Jamie Lawrence 2003-05-13 17:23:54 Re: N all-way relationship
Previous Message Josh Berkus 2003-05-13 16:47:46 Re: Locating all Children given Set of Parents