anchor.diff:    AText := b + SubStr + e;
   end;
   
  -function UTF8CharAtByte(const s: string; const BytePos: integer; out aChar: string): integer;
  +function UTF8CharAtByte(const s: string; const BytePos: PtrInt; out aChar: string): PtrInt;
   var
     CharLen: Integer;
   begin
  
positive.code:   end;
  end;
  
  function Copy8(const s: string; StartCharIndex, CharCount: integer): string;
  begin
    Result := UTF8Copy(s, StartCharIndex, CharCount);
  end;
  
  function Length8(const s: string): integer;
  begin
    Result := UTF8Length(s);
  end;
  
  function Pos8(const SearchForText, SearchInText: string): integer;
  begin
    Result := UTF8Pos(SearchForText, SearchInText);
  end;
  
  procedure Delete8(var S: string; Index, Size: integer);
  begin
    UTF8Delete(S, Index, Size);
  end;
  
  procedure Insert8(const Source: string; var S: string; Index: integer);
  begin
    UTF8Insert(Source, S, Index);
  end;
  
  function fpgCharAt(const s: TfpgString; Index: integer): TfpgChar;
  begin
    Result := UTF8Copy(s, Index, 1);
  end;
  
negative.code:   end;
  end;
  
  function UTF8CStringToUTF8String(SourceStart: PChar; SourceLen: PtrInt): string;
  var
    Source: PChar;
    Dest: PChar;
  