Forum > General

Delphi/Lazarus TStrings differences?


I didn't notice until now...

I created a binary file "parser" in Lazarus, but instead of using file streams etc. I started by simply using TStrings/TStringList LoadFromFile function to get file in memory and than started analysis byte by byte... It worked fine... (I know it's a poor approach :-))

Since I have my "framework" for bussines apps developed on-demand prepared in Delphi (+PrintPreview component, some commercial VCLs required for my project etc.) I decided to port it to Delphi... As the matter of fact, I just copy/pasted the code since it is plain Pascal with classes unit included...

But, in Delphi, LoadFromFile functions different and obviously (using Turbo Pro 2006) it does some text parsing or something since result of the function on my binary test file is always an empty TStrings/TStringList.
Therefore, I had to use TFileStream to get binary file into a string and start analysis. (Of course, that works fine in Lazarus, too...).

Just an observation.


Do you have codepage / widestring / UTF-8 issues?!?

Stumbled me once...

Regards Benny


[0] Message Index

Go to full version