[Lazarus] Making sources compatible with Delphi (but Lazarus is priority)

Mattias Gaertner nc-gaertnma at netcologne.de
Wed May 3 13:29:00 CEST 2017


On Wed, 3 May 2017 12:03:41 +0300
Juha Manninen via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

>[...]
> Mattias Gaertner wrote:
> > Option a) You can use English in sources and load all non ASCII
> > constants via resourcestrings or similar. Then the codepage is
> > irrelevant.
> > Option b) You can store all files as UTF-8 with BOM. Then FPC will
> > store all non ASCII string constants as unicodestrings. Be careful when
> > using PChar with them. This adds implicit conversions, so it might be
> > slower.  
> 
> That must be very confusing. Why didn't you just tell him to use the
> default Unicode support in Lazarus which allows to write Delphi
> compatible code, just by remembering couple of rules.

The "default Unicode support in Lazarus" is not compatible with Delphi.
For compatibility it needs the BOM.

Do you have a link where the couple of rules are listed?


Mattias


More information about the Lazarus mailing list