[Lazarus] String vs WideString

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Aug 15 11:10:45 CEST 2017


On Sat, 12 Aug 2017 17:56:58 -0300
"Marcos Douglas B. Santos via Lazarus" <lazarus at lists.lazarus-ide.org>
wrote:

>[...]
> > Which one? Do you mean Windows CP-1252?  
> 
> Yes...
> But would it make any difference?

Just

> >>[...]
> >> Warning: Implicit string type conversion from "AnsiString" to "WideString"  
> >
> > Explicit type cast:
> >
> > Lib.SetLicense(
> >    WideString(IniFile.ReadString('TheLib', 'license', ''))
> > );  
> 
> Wow... everywhere? :(

You could instead define an overloaded Lib.SetLicense(AnsiString). Or
you could disable this hint altogether for your project (not
recommended). Select the message in the Messages window. Right click
and click on add -vm....

Mattias


More information about the Lazarus mailing list