Using Form in multiple projects - UTF8/non-UTF8 DB Access lazarus / 16-Databases ---------------------------------------------------------------------- grl ยท 2020-04-16 12:54 Hi! In my projects I use UniDAC and Firebird most of the time. Over the years I created an application framework that I use in almost every application. Depending if I use UTF8 or not in by DB-Connection the field definitions in my forms resolve to TWideStringField (for UTF8) or TStringField (for non-UTF8). Changing all the projects to UTF8 is not an option - too much work and too much hassle to check if everything works in combination with the databases. My question is: How do you deal with that problem? Switch between two definitions using a $DEFINE? Will this work in *.lfm too? Is there a way to switch those fields at runtime too? Something like freeing the TStringFields and recreating them as TWideStringFields? Creating two versions of that forms and calling one or another depending on an UTF8 connection or non-UTF8 connection? Anyone else with that problem and perhaps an idea how to deal with that? regards Lukas