TEncoding.ANSI regression - it's UTF-8 now in Lazarus
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:
In Delphi and Lazarus, I used:
S := TStringList.Create;
S.LoadFromFile('ansi1252.txt', TEncoding.ANSI);
to load a file in WIN-ANSI (on my PC Win-1252).
This is not possible any more because TEncoding.ANSI is UTF-8 in Lazarus.
The revision that changed this is r61976.
Steps to reproduce:
See the attached project.
Additional information:
I haven't found any information about this breaking change in https://wiki.lazarus.freepascal.org/Lazarus_2.2.0_release_notes
If this is wanted, tell me how I can load a file in WIN-ANSI (on my PC Win-1252, but on different PCs a different one) encoding and document it on the 2.2.0 release notes page.
Mantis conversion info:
- Mantis ID: 36480
- Version: 2.1 (SVN)
- Fixed in revision: 62474 (#6f1497ad)
- Monitored by: » @flyingsheep (Bart Broersma)
- Target version: 2.2