anchor.diff:  
   
   function  UTF8CharacterLength(p: PChar): integer;
  -function  UTF8CharToUnicode(p: PChar; out CharLen: longint): longword;
  -function  UTF8CharStart(UTF8Str: PChar; Len, Index: integer): PChar;
  -function  UTF8Copy(const s: string; StartCharIndex, CharCount: integer): string;
  -function  UTF8CStringToUTF8String(SourceStart: PChar; SourceLen: SizeInt): string;
  -function  UTF8Length(const s: string): integer;
  -function  UTF8Length(p: PChar; ByteCount: integer): integer;
  -function  UTF8Pos(const SearchForText, SearchInText: string): integer;
  -procedure UTF8Delete(var S: string; Index, Size: integer);
  -procedure UTF8Insert(const SubStr: string; var AText: string; Index: integer);
  -function  UTF8CharAtByte(const s: string; const BytePos: integer; out aChar: string): integer;
  +function  UTF8CharToUnicode(p: PChar; out CharLen: longint): Cardinal;
  +function  UTF8CharStart(UTF8Str: PChar; Len, Index: PtrInt): PChar;
  +function  UTF8Copy(const s: string; StartCharIndex, CharCount: PtrInt): string;
  +function  UTF8CStringToUTF8String(SourceStart: PChar; SourceLen: PtrInt): string;
  +function  UTF8Length(const s: string): PtrInt;
  +function  UTF8Length(p: PChar; ByteCount: PtrInt): PtrInt;
  +function  UTF8Pos(const SearchForText, SearchInText: string): PtrInt;
  +procedure UTF8Delete(var S: string; Index, Size: PtrInt);
  +procedure UTF8Insert(const SubStr: string; var AText: string; Index: PtrInt);
  +function  UTF8CharAtByte(const s: string; const BytePos: PtrInt; out aChar: string): PtrInt;
   
   
   // short form (alias or convenience) functions for the UTF8 ones above
  -function  Copy8(const s: string; StartCharIndex, CharCount: integer): string;
  -function  Length8(const s: string): integer;
  -function  Pos8(const SearchForText, SearchInText: string): integer;
  -procedure Delete8(var S: string; Index, Size: integer);
  -procedure Insert8(const Source: string; var S: string; Index: integer);
  -
  -function  fpgCharAt(const s: TfpgString; Index: integer): TfpgChar;
  +function  Copy8(const s: string; StartCharIndex, CharCount: PtrInt): string;
  +function  Length8(const s: string): PtrInt;
  +function  Pos8(const SearchForText, SearchInText: string): PtrInt;
  +procedure Delete8(var S: string; Index, Size: PtrInt);
  +procedure Insert8(const Source: string; var S: string; Index: PtrInt);
  +
  +function  fpgCharAt(const s: TfpgString; Index: PtrInt): TfpgChar;
   function  fpgAppendPathDelim(const Path: TfpgString): TfpgString;
   function  fpgRemovePathDelim(const Path: TfpgString): TfpgString;
   function  fpgTrimR(const AString, ATrim: TfpgString; ACaseSensitive: boolean = false): TfpgString;
  
positive.code: end;
  
  // returns substring
  function UTF8Copy(const s: string; StartCharIndex, CharCount: integer): string;
  var
    StartBytePos: PChar;
    EndBytePos: PChar;
  
negative.code: 
  
  { Returns the character starting position as PChar in the UTF8Str string. }
  function UTF8CharStart(UTF8Str: PChar; Len, Index: PtrInt): PChar;
  var
    CharLen: LongInt;
  begin
  