[fpc-devel] Unicode support (yet again)

Sven Barth pascaldragon at googlemail.com
Sun Sep 18 10:50:26 CEST 2011


On 18.09.2011 02:22, Flávio Etrusco wrote:
> 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...

Well... you can now take a look at trunk as well, because the changes 
from cpstrnew have been merged yesterday.

Regards,
Sven




More information about the fpc-devel mailing list