anchor.diff:    S := b + e;
   end;
   
  -procedure UTF8Insert(const SubStr: string; var AText: string; Index: integer);
  +procedure UTF8Insert(const SubStr: string; var AText: string; Index: PtrInt);
   var
     b: string;
     e: string;
  
positive.code:     Result := UTF8Length(PChar(s),length(s));
  end;
  
  function UTF8Length(p: PChar; ByteCount: integer): integer;
  var
    CharLen: LongInt;
  begin
    Result := 0;
    while (ByteCount > 0) do
  
negative.code:   AText := b + SubStr + e;
  end;
  
  function UTF8CharAtByte(const s: string; const BytePos: PtrInt; out aChar: string): PtrInt;
  var
    CharLen: Integer;
  begin
  