anchor.diff:      try
         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
  
positive.code: var
    OldEncoding: string;
    OldAttr: Longint;
  begin
    Result:= true;
    while true do
    try
      AppFileAttrPrepare(AFileName, OldAttr);
  
negative.code:             Ed.EncodingName:= cEncNameUtf8_NoBom;
              DoSave;
              MsgBox(Format(msgCannotSaveFileWithEnc, [OldEncoding]), MB_OK or MB_ICONWARNING);
            end;
          on E: EWriteError do
            begin
              MsgBox(msgCannotSaveFile+#10+AFileName, MB_OK or MB_ICONERROR);
              exit(false);
            end;
          else
            raise;
        end;
  