[fpc-pascal] String literals and code page of .pas source file

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Sep 9 17:59:10 CEST 2020


On Wed, 09 Sep 2020 17:44:11 +0200
Tomas Hajny via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:

> On 2020-09-09 17:37, Mattias Gaertner via fpc-pascal wrote:
> > On Wed, 09 Sep 2020 17:25:09 +0200
> > Tomas Hajny via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
> >   
> >> On 2020-09-09 13:51, LacaK via fpc-pascal wrote:
> >> [...]
> >> A simple question - is TLabel.Caption declared as Utf8String (I
> >> don't use Lazarus)? _Then_ it should work without any issues
> >> and/or special attention from users.  
> > 
> > Declaring as UTF8String would insert implicit conversion code for
> > all String (CP_ACP), so basically everywhere.  
> 
> Everywhere except when used with other Utf8string variables and 
> constants. 

True.

> The implicit conversion is explicitly expected by the user
> in this case if I understand it correctly (source in CP1250), right?

If you mean the "non implicit conversion" requires explicit
conversion by the user, then yes.

Mattias


More information about the fpc-pascal mailing list