Thread: Encoding problems

Encoding problems

From
"gustavo.oliveira"
Date:
HI!

I am in trouble with my database encoding.

I have a application written in JAVA, the JSP's pages are seted with the
charset ISO-8859-1

My postgresql database is seted as UNICODE.

The problem occurs in a enctype="multipart/form-data" page. All the data
goes to the insert statement correctly, but when I tried to get it back,
some strange caracteres appears. When I look for the inserted data in the
database, the data is incorrectly stored.

All others forms in my applicattion that aren't multipart work fine.

If I edit the database manually, I get data in the right way.

How can I solve this problem? Any ideias?

Thnks

---
Gustavo Borges de Oliveira
PIPE - FAPESP
3WT - Wireless Web World Tech
gustavo.oliveira@3WT.com.br
tel: +55 16 3371-4343
fax: +55 16 3371-9847

Re: Encoding problems

From
Tom Lane
Date:
"gustavo.oliveira" <gustavo.oliveira@3WT.com.br> writes:
> I am in trouble with my database encoding.

> I have a application written in JAVA, the JSP's pages are seted with the
> charset ISO-8859-1
> My postgresql database is seted as UNICODE.

The JDBC list would probably be better able to help you with this,
but I have some recollection that Java *only* works with Unicode (UTF8)
internally.  Where are you translating to/from ISO-8859-1?

            regards, tom lane