Migration, Delphi and Firebird. What is the correct way to deal with the encode issue?


I have a project in Delphi 7 that uses Firebird.
I'm thinking of migrating this application to a Delphi XE* version.

However, we know that as of Delphi 2009 the String default is Unicode and no longer ANSI.

My Firebird database was created with ANSI standard, and so much so that the system writes and reads data from the database without any character compatibility problems. By default Firebird uses WIN1252 as the encode, which I believe is similar or ANSI itself.

In projects with SQL Server and Entity Framework we are advised not to use Unicode because it takes up more space. Okay, and we have no problem with that. It is then set to VARCHAR.

I'm thinking of taking the entire database schema and recreating the base in a new pattern, even if it's still in GDB even using Firebird 2.5, but not using a Unicode pattern in text-type columns in the database? Use what kind?

Because I don't want to have to treat the whole system to use the AnsiString type, but rather the String itself.

What would be the correct way to handle this situation?


You can continue using WIN1252 in Firebird. It won't make any difference in this matter.

Scroll to Top