Re: Oracle characterset confusion when storing encoded passwords

From: Noons <wizofoz2k_at_yahoo.com.au>
Date: Mon, 4 Feb 2008 02:13:46 -0800 (PST)
Message-ID: <190accbe-6cac-4f35-ba22-8b28a5c17454@m34g2000hsf.googlegroups.com>


On Feb 4, 8:44 pm, 151 <ga..._at_my-deja.com> wrote:

> 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.

VARCHAR2 assumes character data that matches whatever encoding you've set in your database for character data.

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

Bingo.

>
> 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"?

if you insist on forcing Oracle to treat that data as a valid WE8ISO8859P15 character string, yes indeed.

What you need to do is store that encrypted data as a BLOB. In which case Oracle treats it as a binary string, no translation. Which is what you want if you're doing the encryption yourself. Received on Mon Feb 04 2008 - 04:13:46 CST

Original text of this message