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

Asked

Viewed 483 times

6

I have a project in Delphi 7 that makes use of Firebird.
I think about migrating this application to a Delphi XE version*.

However, we know that from Delphi 2009 the String standard is Unicode and no longer ANSI.

My Firebird database was created with ANSI standard, and so much so that the system saves and reads database data without character compatibility issues. By default Firebird uses WIN1252 as an 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. Ok, and we have no problem with that. It is then set to VARCHAR.

I think about taking all the schema of the database and recreating the base in a new pattern, even it is still in GDB even using Firebird 2.5, but not using a Unicode pattern in the text columns in the database? Use what type?

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 right way to treat this situation?
Grateful

  • It’s a question I have, excellent question!

  • 1

    Here’s some info about the bank: http://answall.com/questions/13708/qual-a-diferen%C3%A7a-em-utilizar-a-gds32-dll-e-a-fbclient-dll-e-entre-a-extens%C3%A3o-f

1 answer

3


You can continue using WIN1252 in Firebird. It will make no difference in this issue.

  • And it doesn’t generate character conflict? Example, can I do something like: q.FieldByName('Field').AsString := 'Ü'; that won’t cause a type compatibility problem? Instead of having to do q.FieldByName('Field').AsAnsiString := 'Ü'; ? Who is in charge of treating these types, the drivers of the bank? Thank you for your response!

  • @Jamestk When to use asString will be using a Unicode type, which surely has the character Ü. The database access component should do the conversion. But if you have any specific questions, it would be better to build an example of code.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.