Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing string via EF Core contains unexpected bytes #1094

Open
stormcrow79 opened this issue Feb 20, 2023 · 0 comments
Open

Writing string via EF Core contains unexpected bytes #1094

stormcrow79 opened this issue Feb 20, 2023 · 0 comments

Comments

@stormcrow79
Copy link

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants