[Lazarus] String vs WideString

Marcos Douglas B. Santos md at delfire.net
Sat Aug 12 22:43:29 CEST 2017


On Sat, Aug 12, 2017 at 5:32 PM, Mattias Gaertner via Lazarus
<lazarus at lists.lazarus-ide.org> wrote:
> On Sat, 12 Aug 2017 16:46:09 -0300
> "Marcos Douglas B. Santos via Lazarus" <lazarus at lists.lazarus-ide.org>
> wrote:
>
>>[...]
>>     Lib.SetLicense(
>>       IniFile.ReadString('TheLib', 'license', '')
>>     );
>
> What encoding has the ini file?

ANSI. A simple text file on Windows with only ANSI chars.

But I'm so sorry Mattias, it was my fault.
The program was reading the wrong file version (problem in paths...).

It works now, but I have one question:
What is the right way to code to do not see this warning?

Warning: Implicit string type conversion from "AnsiString" to "WideString"

Regards,
Marcos Douglas


More information about the Lazarus mailing list