anchor.diff:  end;
   
   
  +//Read mission file to a string and if necessary - decode it
   function TMissionParser.ReadMissionFile(const aFileName:string):string;
   var
     i,Num:cardinal;
  
positive.code:     //Detect whether mission is encoded so we can support decoded/encoded .DAT files
      //We can't test 1st char, it can be any. Instead see how often common chracters meet
      Num := 0;
      for i:=0 to F.Size-1 do
        if PAnsiChar(cardinal(F.Memory)+i)^ in [#9,#10,#13,'0'..'9',' ','!'] then
          inc(Num);
  
      //Usually 30-50% is numerals/spaces, tested on typical KaM maps, take half of that as margin
  
negative.code:       F.SaveToFile(aFileName+'.txt');
  
      for i:=0 to F.Size-1 do
        if PByte(cardinal(F.Memory)+i)^ in [9,10,13] then //tab, eol
          PByte(cardinal(F.Memory)+i)^ := $20; //Space
  
      Num := 0;
      for i:=0 to F.Size-1 do begin
        PByte(cardinal(F.Memory)+Num)^ := PByte(cardinal(F.Memory)+i)^;
        if (Num<=0) or (
          (PWord(cardinal(F.Memory)+Num-1)^ <> $2020) //Skip double spaces and !!
          and (PWord(cardinal(F.Memory)+Num-1)^ <> $2121)) then
          inc(Num);
      end;
  
      SetLength(Result, Num); //Because some extra characters were removed
      F.Position := 0;
      F.ReadBuffer(Result[1], Num);
    finally
  