[Lazarus] TSynEdit.Lines.LoadFromFile and UTF8

Bart bartjunk64 at gmail.com
Thu May 30 20:44:25 CEST 2013


I'm a bit confused here.
I have a TSynEdit.
If I do SynEdit1.Lines.LoadFromFile(OpenDialog1.FileName) this
succeeds on filenames with unicode characters within the current
No need to use Utf8ToSys like it is necessary for TMemo.Lines.LoadFromFile.

AFAICS the lines property of a TSynEdit is of type TStrings, just like
the Lines of TMemo.

Even while I don't understand this, I can live with it.
TSynEdit needs no Utf8ToSys for loading, OK.

But wait, if a filename has unicode characters outside the current
codepage (I have a folder with some asian charcters in the name), this
fails al of the sudden.

So, now I need to know the why, or else I cannot fix it.

B.t.w. the Lazarus IDE is able to this file, and so is a
TStringListUtf8 instance.


More information about the Lazarus mailing list