Oracle characterset confusion when storing encoded passwords

From: 151 <>
Date: Mon, 4 Feb 2008 01:44:33 -0800 (PST)
Message-ID: <>

Hello there, I hope someone can help me with a problem that I believe relates to character encoding in oracle....

I have a simple Java password encoding routing that XORs a password then sends it off the be stored in a VARCHAR2 field. The Java class is running inside Tomcat which is configured to UTF-8. So good.

To check the password when a user logs in (via a JSP) I fetch the encoded version from the Oracle DB and then re-run the encode method agains the users input - if the result matches - login is fine.

This all works fine for anything in the single byte encoding range. However, if I try the same thing with characters used by other languages (often referred to as the extended ascii set though I understand this to be mis-named) it fails...

So somewhere along the way what I send to the DB (at user registration time) to store in the VARCHAR2 as the encoded password is being changed slightly.

The Oracle DB seems to be set to the WE8ISO8859P15 characterset and I am sure this is where the problem lies.

my question then is: if I insert data into a VARCHAR2 field into the DB that was encoded as UTF8 originally - if the database is using WE8ISO8859P15 - would this result in the data being "altered"?

Thanks for reading if you got this far! Received on Mon Feb 04 2008 - 03:44:33 CST

Original text of this message