views:

50

answers:

1

My test-database has a AL32UTF8 encoding, however the production database has a WE8ISO8859P1 encoding. My application is writen in .NET and I use the default System.Data.OracleClient.OracleConnection class to make the connection.

I create a IDbCommand and I add IDbDataParameter objects when I want to INSERT some strings with non ASCII symbols.

On the test database everything works well, apperently converting .NET's internal string format to AL32UTF8 works fine. However on production I just doesn't work. The .NET internal string representation (which is utf16) can't be converted to WE8ISO8859P1 somehow.

My question: Can you specify the database's encoding in the connection-string? Or is there another method to tell the driver (System.Data.OracleClient.OracleConnection) that the database expects a specific encoding?

+2  A: 

The conversion should happend automatically as long as you don't use characters that cannot be represented in WE8ISO8859P1. If you have such characters, you cannot store it in the database anyway.

If you try to store the Euro sign (€), you'll be out of luck. It's not part of WE8ISO8859P1.

Codo