[Lazarus] Making sources compatible with Delphi (but Lazarus is priority)
Juha Manninen
juha.manninen62 at gmail.com
Wed May 3 21:47:15 CEST 2017
On Wed, May 3, 2017 at 12:03 PM, Juha Manninen
<juha.manninen62 at gmail.com> wrote:
> Marcos Douglas B. Santos wrote:
>> But if I put theses constants as resourcestrings, it's Ok as Mattias
>> told me, right?
>
> I don't think it makes any difference. You can use the full Unicode in
> both cases.
I stand corrected.
If you share and edit the sources between Delphi and Lazarus then you
cannot use the full Unicode. Resourcestrings work for translated
Unicode texts.
If you edit only with Lazarus and copy the files for Delphi
compilation then you can use full Unicode.
Actually I now remember testing with UTF-8 BOM and noticing the same
issue but I forgot already. This is an unfortunate side-effect of the
solution being a hack.
It is so close to being easily portable.
Why Delphi adds the BOM? Why can't it just read the file and
understand it is UTF-8?
If somebody is interested, this could be solved by removing the BOM
from all files by a script before opening again in Lazarus. It could
even be a plugin package in Lazarus. It would be relatively easy to
implement.
How many people are editing their sources in both Delphi and Lazarus?
Juha
More information about the Lazarus
mailing list