Versions of Delphi prior to Delphi 2009 were not Unicode compatible.
Upgrading legacy code to Delphi 2009 and later requires code changes to ensure it is compatible with the new default Unicode strings.
Although one could change all references to String to AnsiString, this is probably not a great idea as you lose Unicode capability, so only convert the String reference to AnsiString if there is likely to be issues with it being a Unicode string.
The following are some resources to assist:
- Marco Cantu’s White paper (pdf)
- Delphi in a Unicode World Part I: What is Unicode, Why do you need it, and How do you work with it in Delphi?
- Delphi in a Unicode World Part II: New RTL Features and Classes to Support Unicode
- Delphi in a Unicode World Part III
- Migrating Legacy Applications to Unicode-enabled Delphi 2010 with Cary Jensen