Default maximal length for VarChar Re: VChar vs VText

Ed Kleban Ed at Kleban.com
Wed Dec 7 23:41:00 CST 2005




On 11/28/05 5:59 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:

> On 11/28/05 3:57 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
> 
>>> Actually in v2 for UTF8 the best size of VarChar will be 2044.
>>> 
>> 
>> Why?  Does this have to do with the natural page size of MacOS X or
>> something?  
> 
> Yes. Best size of page is 4K
> 
> We assume that page should keep at least 2 records.
> 
> So max size *in bytes* for one record is (4K - header) / 2 = 2044
>   

Ok,... but If I recall correctly, UTF8 does not work yet in V4RB 2.xx
correct?   

Is this true?  What bad things happen if I set db.StorageEncoding = UTF-8
(whatever the correct syntax for that is)?

If I must use UTF16 as my StorageEncoding, however I plan to use just simple
ASCII 8-bit character strings in RB, then presumably I should declare my
VarChar fields as VarChar( 1022 ) even though the test I am using in RB to
determine if a string will fit is "LenB( aString ) <= 2044"

Is this correct?

Will Valentina be able to store strings in UTF-8 in the future?

Thanks!
--Ed 




More information about the Valentina mailing list