[fpc-devel] Unicodestring branch, please test and help fixing
listmember
listmember at letterboxes.org
Thu Sep 11 22:33:32 CEST 2008
>> procedure TLabel.Paint(...)
>> begin
>> if *Caption.IsRTL *then
>> DrawCaptionRTL(0,0,*Caption.AsUTF8*, flags)
>> else
>> DrawCaption(0,0,*Caption.AsUTF8*, flags);
>> end;
>>
>> Is not that enough?
>
> What is the gain as opposed to
>
> procedure TLabel.Paint(...)
> begin
> if IsRTL(Caption) then
> DrawCaptionRTL(0,0,AsUTF8(Caption), flags)
> else
> DrawCaption(0,0,AsUTF8(Caption), flags);
> end;
>
> In other words where is the benefit from OOP in this ?
IMO, both are deficient as they both assume that a string block (text)
is either RTL or LTR.
Doesn't that mean we will be --by design-- unable to write something
like 'Yom Kippur (יוֹם כִּפּוּר)' on a caption?
This is why I keep asking that the 'TCharacter' or 'TChar' needs to have
a language attribute.
More information about the fpc-devel
mailing list