[Lazarus] SynEdit.Lines.LoadFromFile and non-ascii filenames

Mattias Gaertner nc-gaertnma at netcologne.de
Wed Sep 21 17:45:45 CEST 2011


On Wed, 21 Sep 2011 17:26:18 +0200
Bart <bartjunk64 at gmail.com> wrote:

> When I control-clicked on TSynEdit.Lines.LoadFromFile() I ended up in
> TSrings.LoadFromFile, which does
> TFileStream.Create(FileName,fmOpenRead or fmShareDenyWrite).
> I also ended up here when control-clicking on TMemo.Lines.LoadFromFile.

TSynEdit.Lines is a TSynEditLines, which uses TSynEditFileReader which
does UTF8ToSys.

 
> So I did not really understand why it worked different.
> 
> Coming form Delphi(3) on Win9x, I still cannot get to grips with all
> this Unicode string stuff.
> It would be nice if RTL and LCL would speak the same
> "string-encoding-language", or at least it would be transparent to the
> programmer.

Yes.
And that's the goal. As I wrote: there is progress.

 
> That being said, it is not meant as critisizing Fpc/Lazarus.

You are welcome. The Unicode problem is known.


> Current Lazarus/Fpc outperforms my old Delphi 3 by far.
> (Only the D3 compiler is much faster)
> I now only use Delphi for comaparing Laz vs. Delphi behaviour if I
> suspect a bug in Laz.


Mattias




More information about the Lazarus mailing list