Inserting or updating a string field using Entity Framework results in unexpected byte sequences when all of the following conditions are met:
the connection string specifies an encoding other than UTF-8
the entity contains a string property where the database column has the character set 'NONE'
Environment
Firebird 4.0.2 x64 on Windows
.NET 6
FirebirdSql.EntityFrameworkCore.Firebird 9.1.1
create table tests (
id int generated by default as identity primary key,
name varchar(50) character set none);
var connectionString = "DataSource=localhost;User=SYSDBA;Password=********;Database=employee;Character Set=ISO8859_1;";
context.Tests.Add(new Test() { Name = "Entr\u00E9e" });
Inserting or updating a string field using Entity Framework results in unexpected byte sequences when all of the following conditions are met:
Environment
Expected outcome: name contains "Entrée" with an accented e Actual outcome: name contains "Entrée" (the UTF-8 bytes for U+00E9)