FirebirdSQL / NETProvider

Firebird ADO.NET Data Provider
https://www.firebirdsql.org/en/net-provider/
Other
159 stars 65 forks source link

Writing string via EF Core contains unexpected bytes #1094

Open stormcrow79 opened 1 year ago

stormcrow79 commented 1 year ago

Inserting or updating a string field using Entity Framework results in unexpected byte sequences when all of the following conditions are met:

Environment

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" });

Expected outcome: name contains "Entrée" with an accented e Actual outcome: name contains "Entrée" (the UTF-8 bytes for U+00E9)