Umlauts are codepage-sensitive in Ansi environments, like D2007, and thus require extra handling in Unicode environments, like XE2. As such, it is best to read/write your data using a codepage-neutral format instead, like UTF-8. Especially if the data has to move from one PC to another, where the OS default Ansi codepage may be different.
In this particular situation, you may have to find out what specific codepage was being used by the OS when the D2007 code saved the data (since it would have used the OS default Ansi codepage), and then explicitally tell the XE2 code to use that same codepage when reading the data. In XE2, the TStrings.LoadFrom...()
methods have an optional TEncoding
parameter You can use the TEncoding.GetEncoding()
method to get a TEncoding
object for a specific codepage.