We want to use Unicode with Delphi 2009 and Interbase and found that to switch character encoding from WIN1252 to UNICODE_FSS or UTF8, we first need to replace all instances of TStringField with TWideStringField in all datamodules. For about 60 Damodules we can’t just do it in one weekend. I see only two options for the migration strategy:
- find a workaround that allows you to use existing TStringField fields without causing the "expected: TWideStringField" error
or
- remove all constant fields to avoid row type conflict.
As far as I know, field types for persistent database fields are registered in some class registry. Can we use this so that Delphi believes that TStringField is suitable for a column with an Interbase character encoded with UNICODE_FSS or UTF8?
Or can we use a commercial dbExpress driver that works with TStringField in both cases?
See also my related question: Delphi dbExpress and Interbase: steps and risks of migrating UTF8?
Update: after replacing all occurrences of TStringField with TWideStringField in all DFM and PAS files, we found that now we also need to multiply the value of the TWideStringFields Size property by four (if we use UTF8) in about 100 places. So I start bounty to reduce manual work, to fix DFM
unicode migration delphi dbexpress interbase
mjn
source share