Make TStrings.LoadFromFile and .LoadFromStream Delphi-compatible
Original Reporter info from Mantis: kluug.net @onpok
-
Reporter name: Ondrej Pokorny
Original Reporter info from Mantis: kluug.net @onpok
- Reporter name: Ondrej Pokorny
Description:
Related issue reports: #29848 (closed), #30508 (closed)
Michael Van Canneyt made TStringStream constructor encoding-aware for #30508 (closed) and broke FPC compatibility. The same scenario should be also applied for TStrings.LoadFromStream - now the LoadFromStream non-encoding overload is not encoding aware, which doesn't match Delphi behavior and recent TStringStream changes.
The attached patch makes TStrings.LoadFromStream(Stream: TStream) and TStrings.LoadFromFile(const FileName: string) encoding-aware.
The old-FPC compatible methods are LoadFromStreamRaw and LoadFromFileRaw.
Mantis conversion info:
- Mantis ID: 32871
- Fixed in version: 3.1.1
- Fixed in revision: 37965 (#cbc50c5f)
- Target version: 3.2.0