sysutils: TEncoding.IsStandardEncoding: FSystemEncodings are standard encodings (they must not be destroyed in user code)

git-svn-id: trunk@43846 -
This commit is contained in:
ondrej 2020-01-02 20:04:52 +00:00
parent e1e4f4c122
commit 944e99d71c

View File

@ -240,9 +240,14 @@ var
Encoding: TEncoding;
begin
if Assigned(AEncoding) then
begin
for Encoding in FStandardEncodings do
if Encoding = AEncoding then
Exit(True);
for Encoding in FSystemEncodings do
if Encoding = AEncoding then
Exit(True);
end;
Result := False;
end;