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

Mattias Gaertner nc-gaertnma at netcologne.de
Sun May 7 10:30:23 CEST 2017


On Sun, 7 May 2017 10:10:26 +0200
Florian Klaempfl via Lazarus <lazarus at lists.lazarus-ide.org> wrote:

> Am 05.05.2017 um 13:35 schrieb Graeme Geldenhuys via Lazarus:
> > On 2017-05-05 12:17, Mattias Gaertner via Lazarus wrote:  
> >> I wonder if it would help if FPC would store UTF-8 string literals as
> >> UTF-8   
> > 
> > Yeah, that would be the logical thing to do.   
> 
> Why? What makes a string literal UTF-8?

Here: $codepage utf-8 and non ASCII.


> > FPC not doing that is what
> > really confused me.  
> 
> You have to distinuish between source encoding and string encoding.

Yes, but sometimes the string encoding is not obvious:

{$codepage utf8}
const s = 'äöüالعَرَبِيَّة';
begin
  writeln(s); // needs widestringmanager
end.

Mattias


More information about the Lazarus mailing list