[fpc-pascal] Change in TStrings.LoadFromFile/LoadFromStream encoding handling

Michael Van Canneyt michael at freepascal.org
Sun Jan 14 13:05:18 CET 2018


Hello,

Just a heads-up.

The LoadFromStream and LoadFromFile calls of TStrings have been changed. 
They now by default take into account encoding.

This change was necessary for Delphi compatibility and to be more in line
with the TStringStream.Create endocing aware constructors.

If you don't mess with the default encodings, then nothing should change. 
If you do change encodings then you may need to check your code.

You can always revert to the old behaviour by passing a True value for the
new IgnoreEncoding parameter to LoadFromStream/LoadFromFile.

Change is documented at:
http://wiki.freepascal.org/User_Changes_Trunk#Classes_TStrings.LoadFromStream.2FFile_encoding_handling


Michael.



More information about the fpc-pascal mailing list