[Lazarus] Is Lazarus FPC compatible to RAD XE5?

Bo Berglund bo.berglund at gmail.com
Sun Jun 14 18:51:04 CEST 2015


On Sun, 14 Jun 2015 15:45:33 +0300, Juha Manninen
<juha.manninen62 at gmail.com> wrote:

>On Sun, Jun 14, 2015 at 12:23 PM, Bo Berglund <bo.berglund at gmail.com> wrote:
>> So I had to start a new VCL project when I did the Unicode conversion
>> (UTF8 is what I used) and then add all the sources to that project and
>> set the various properties like search paths and such manually...
>
>Do you use UTF-8 with XE Delphi? Why? It triggers conversion between
>UTF-8 and UTF-16 at every assignment.

We have developed a couple of components for handling the translation
of our applications into different languages. The languages are
defined by ini file formatted text files and before my conversion
these were just plain ini files accessed via the TIniFile class.

But for Unicode I use a different subclass of TCustomIniFile, namely
TMemIniFile and it has (now in XE) an optional Create parameter that
sets the encoding of data in the file. Here I use UTF8.
But internal to the application the texts are in strings, which now
means Unicode strings since Embarcadero simply redefined what type
string means. So only when reading in the language strings into the
internal arrays will there be any conversion.

This brings to mind these components for language handling:
- One on each form which will have its GUI texts managed
- Another in a data module to handle the complete application
- A 3rd type also on the data module to handle non-GUI texts, which
are sent by code to message boxes and dialogs or written on graphics
etc.

These components need to be possible to use in Lazarus/FPC as well.
>
>So, what the does the automatic conversion (in Tools menu) say?

I am now investigating if it is likely I could do this and I have not
yet installed Lazarus. The computers I used back in 2005 and 2010 are
long gone...


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list