Page 1 of 1

Euro (€) characters are inserted into the database as upside down

Posted: Tue 26 Feb 2019 13:48
by ITLV
Since we moved to Direct Mode, we see that Euro (€) characters are inserted into the database as upside down question marks.

This connection string worked before:
- connstr = "Data Source=DP00V.WORLD;User ID=APP_DPL;Password=xxx";

These connection strings work, but with the character problems:
- connstr = "Data Source=dbbd01.dg3.be;User ID=APP_DPL;Password=xxx;Pooling=true;Connection Lifetime=1800;Direct=true;Port=1522;SID=DP00V";
- connstr = "Data Source=dbbd01.dg3.be;User ID=APP_DPL;Password=xxx;Pooling=true;Connection Lifetime=1800;Direct=true;Port=1522;SID=DP00V;Unicode=true";

We are using Entity Framework 6.0 and Devart DotConnect.
Versions:
- Devart.Data: 5.0.1704.0
- Devart.Data.Oracle: 9.4.280.0

Re: Euro (€) characters are inserted into the database as upside down

Posted: Fri 01 Mar 2019 13:20
by Pinturiccio
Please specify the following:
1. The type of column, to which you insert the Euro character.
2. The NLS_CHARACTERSET and NLS_NCHAR_CHARACTERSET parameters of your Oracle server. You can get this information by executing the following query:
SELECT * FROM NLS_DATABASE_PARAMETERS

Re: Euro (€) characters are inserted into the database as upside down

Posted: Wed 06 Mar 2019 07:56
by ITLV
Hi,

DATA TYPE of the column: VARCHAR2
NLS_CHARACTERSET: 'WE8ISO8859P1'
NLS_NCHAR_CHARACTERSET: 'AL16UTF1'

Re: Euro (€) characters are inserted into the database as upside down

Posted: Thu 07 Mar 2019 15:42
by Pinturiccio
ITLV wrote:DATA TYPE of the column: VARCHAR2
NLS_CHARACTERSET: 'WE8ISO8859P1'
Your database can store string data only in WE8ISO8859P1 character set in VARCHAR2 columns. The Euro (€) character is not present in this charset.

If you want to store unicode characters, you need to use the NVARCHAR2 data type in your Oracle table and use the connection string with the "Unicode=true" parameter.