Subject | Re: [IBO] Unusable Alpha Version for Delphi 2009 |
---|---|
Author | Andreas Hesse |
Post date | 2009-04-27T10:03:43Z |
m. Th. schrieb:
The only reason for this was, because AnsiString is Referece-counted.
But with D2009 it is a very bad design.
So for using Unicode within DB-Layer we must use TWideStringField.
see above, using TWideStringField is the only possibility.
created dynamically).
But I don't check the source for it.
The native TIB_Column does not differ between AnsiString and WideString
Column. It only differ between Fixed Text (Char) and Variable Text
(VarChar) columns.
And if it is a AnsiString or a WideString Field depends on the
connection charset.
Andreas
> Andreas Hesse wrote:Strings for storing Bytes is and was always bad design.
>> Hello Jason,
>>
>> the last alpha version of IBO 4.9 is really unuseable with Delphi
>> 2009. It doesn't really support unicode.
>>
> Yes.
>
>> AsString must return a string, not an AnsiString.
>>
>
> Take care here!!
>
> This was a very big discussion 'somewhere' :-). I cannot tell you many
> things but due of compatibility reasons - mainly concerns which are tied
> to the fact that many users are storing non-text data (binary etc.)
> using .AsString - the Get/SetAsString uses GetAsAnsiString internally.
The only reason for this was, because AnsiString is Referece-counted.
But with D2009 it is a very bad design.
> From D2009's DB.PAS:AsString returns a string (=UnicodeString)
>
> function TStringField.GetAsString: string;
> begin
> Result := string(GetAsAnsiString);
> end;
>TStringField is really a TAnsiStringField.
> ....also you can have a look at TStringField.GetValue(var Value:
> AnsiString): boolean;
> and, of course at SetAsString.
>
So for using Unicode within DB-Layer we must use TWideStringField.
> The workaround (for the time being) is to use .AsWideString whichNo, it returns only a Unicoded AnsiString for TStringField.
> returns an Unicode string.
see above, using TWideStringField is the only possibility.
>No, Text Fields should be now created as TWideStringField's (if they are
> Also, since the above hard-cast is in DB.Pas (iow outside of our
> control) there will be problems with TIBO layer.
created dynamically).
But I don't check the source for it.
The native TIB_Column does not differ between AnsiString and WideString
Column. It only differ between Fixed Text (Char) and Variable Text
(VarChar) columns.
And if it is a AnsiString or a WideString Field depends on the
connection charset.
>No, I know that Delphi 5 is still productive.
>> I can send you my last version of IBO for D2009.
>> Not everything is working (TIBO...-Components have problems,
>
> WHAT problems?
>
>> automatic
>> Text-Blob-Conversion is not implemented for FB 2.1, and a few more)
>>
>
> Hmmm... see above.
>> My main design desicions:
>> - drop support for Delphi3/4
>>
>
> +1!!!
>
> Also, perhaps, D5/6 can be dropped. The polls indicate that after D2007
> the vast majority of users are concentrated on D7/D2007. But if someone
> is against please raise the hand.
>I will look at it.
>> - all handling of string conversion will be done at connection level
>> called by the TIB_Column Set/Get-Methods
>> (real conversion between connection charset and system charset)
>> (prefered connection charset is now UTF8)
>>
>>
>
> Take care, as I said, at the problem described above. Did you consider
> to apply for the Weaver beta test? (see http://beta.embarcadero.com)
>
>> - all string handling will be done with unicode stringsAny news from Jason?
>> (length, uppercase, lowercase, ...)
>>
>>
>
> Agreed.
>
>> In the moment it is only a ansi-fied version of IBO without real
>> unicode support.
>>
>>
> Yes.
>
Andreas