Delphi 2009 dbExpress and Interbase: Unicode migration steps and risks?
Posted
by mjustin
on Stack Overflow
See other posts from Stack Overflow
or by mjustin
Published on 2010-02-20T15:35:36Z
Indexed on
2010/03/14
14:35 UTC
Read the original article
Hit count: 412
Currently, our database uses Win1252 as the only character encoding. We will have to support Unicode in the database tables soon, which means we have to perform this migration for four databases and around 80 Delphi applications which run in-house in a 24/7 environment. Are there recommendations for database migrations to UTF-8 (or UNICODE_FSS) for Delphi applications? Some questions listed below. Many thanks in advance for your answers!
- are there tools which help with the migration of the existing databases (sizes between 250 MB and 2 GB, no Blob fields), by dumping the data, recreating the database with UNICODE_FSS or UTF-8, and loading the data back?
- are there known problems with Delphi 2009, dbExpress and Interbase 7.5 related to Unicode character sets?
- would you recommend to upgrade the databases to Interbase 2009 first? (This upgrade is planned but does not have a high priority)
- can we simply migrate the database and Delphi will handle the Unicode character sets automatically, or will we have to change all character field types in every Datamodule (dfm and source code) too?
- which strategy would you recommend to work on the migration in parallel with the normal development and maintenance of the existing application? The application runs in-house so development and database administration is done internally.
Update: one problem I found now is that there are two different persistent field types for Unicode and non Unicode character fields. For the existing database, dbExpress creates TStringField
objects. For the Unicode database fields, dbExpress creates (or expects!) TWideStringField
objects. This looks like a lot of work lies ahead. While we could try to avoid persistent fields (and add calculated fields at run time), Of course we would prefer a solution which does not require so many changes in existing units and DFM files.
© Stack Overflow or respective owner