[fpc-devel] Unicode support (yet again)

Flávio Etrusco flavio.etrusco at gmail.com
Sun Sep 18 02:22:52 CEST 2011


On Sat, Sep 17, 2011 at 10:59 AM, DaWorm <daworm at gmail.com> wrote:
> This might be total crap, so bear with me a moment,  In an object like
> a Stringlist, there is a default property such as Strings, such that
> List.Strings[1] is equivalent to List[1], is there not?  If, as in
> .NET or Java, all strings become objects, then you could have a String
> object whose default property is Chars, whose type isn't really a
> char, but another String whose length is one entity.

That's somewhat what I was thinking. Actually something like

  UnicodeString = object
  strict private
    FEncoding: Integer;
    FBuffer: AnsiString;
    function GetCodePointAt(AIndex: SizeInt): Integer;
    procedure SetCodePoint(AIndex: SizeInt; p_Value: Integer);
  public
    property CodePoint[AIndex: SizeInt]: Integer read GetCodePointAt
write SetCodePoint; default;
  end;


I just don't whether something like this is already implemented in the
test branches, at least for -err- testing...

-Flávio



More information about the fpc-devel mailing list