Euro sign not displayed properly when fetched from DB

Hi,

I stored the euro sign (€ ) (press alt+0 1 2 8 on Windows to get that sign) in an Oracle database table in varchar2 type column. when I do 'select * from table_euro;', I get the euro sign displayed properly in SQL prompt.

SQL> select * from table_euro

2 /

NAME

--

Now, I programatically read it using Java Resultset object, but it displays as ?(which is Alt + 1 2 8 in key press). This' how I fetch it programmatically:

dbStatement = dbCon.createStatement(ResultSet.TYPE_FORWARD_ONLY,

ResultSet.CONCUR_READ_ONLY);

dbDataReader = dbStatement.executeQuery(query);

....

while(until result set is read fully)

{

Object fieldData = dbDataReader.getObject(fieldIndex);

System.out.println(fieldData);

}

For the euro sign, the above prints ?. Why is that? Can anyone please throw some light on it?

Thanks.

[924 byte] By [GSPa] at [2007-10-3 6:41:31]
# 1

Could be a conflict between the character encoding your command shell actually expects, and the default one java is using.

Try printing the hex value of the character and check it against the definitions at www.unicode.org. That will tell you if it's retrieving it or printing it that's at fault.

malcolmmca at 2007-7-15 1:30:37 > top of Java-index,Java Essentials,Java Programming...