Always read portable settings file and imported settings file in UTF8 mode, instead of (falsely) auto-detecting the encoding. Fixes broken characters loaded from a portable file larger than the examined 16 (?) KB. See pm from FP.

This commit is contained in:
Ansgar Becker
2021-03-03 07:39:03 +01:00
parent 5204ac54fa
commit 3e7a706caa

View File

@ -4111,7 +4111,7 @@ begin
raise Exception.CreateFmt('File does not exist: %s', [Filename]);
end;
Content := ReadTextfile(FileName, nil);
Content := ReadTextfile(FileName, UTF8NoBOMEncoding);
Lines := Explode(CRLF, Content);
for i:=0 to Lines.Count-1 do begin
// Each line has 3 segments: reg path | data type | value. Continue if explode finds less or more than 3.