anchor.diff:  var
     OldEncoding: string;
     OldAttr: Longint;
  -  bNotEmpty: boolean;
   begin
     Result:= true;
  -  bNotEmpty:= Ed.Strings.Count>0;
     while true do
     try
       AppFileAttrPrepare(AFileName, OldAttr);
  
positive.code:       try
          DoSave;
          //prevent empty result file, issue #3435
          if bNotEmpty and (FileUtil.FileSize(AFileName)=0) then
            raise EWriteError.Create('Saved to the empty resulting file');
        except
          on E: EConvertError do
            begin
  
negative.code:       Ed.EndUpdate;
      end;
      AppFileAttrRestore(AFileName, OldAttr);
      exit;
    except
      if MsgBox(msgCannotSaveFile+#10+AFileName, MB_RETRYCANCEL or MB_ICONERROR) = IDCANCEL then
        exit(false);
    end;
  end;
  
  