Default maximal length for VarChar Re: VChar vs VText
Ed Kleban
Ed at Kleban.com
Thu Dec 8 08:21:08 CST 2005
On 12/8/05 2:57 AM, "Ruslan Zasukhin" <sunshine at public.kherson.ua> wrote:
> On 12/8/05 7:41 AM, "Ed Kleban" <Ed at Kleban.com> wrote:
>
> For field with single byte encoding, you will be able use VarChar[2044].
Ok, let's do the math one more time. I suspect the number 2044 may be
wrong.
We have a 4096 byte page less (8-byte page header) less (4 byte
string-length-header for each of 2 strings)
= 4096 - 8 - (4 * 2) = 4096 - 16
= 4080 bytes for storage of actual string data,
or 4080 / 2 = 2040 maximum storage bytes for each of two strings
which in UTF-16 with two bytes per string
= max 1020 characters per string.
Correct? Or did I get it wrong?
> You know, may be you can TRY to mark some field as
> fld.StorageEncoding = "MacRoman" or "Latin1"
>
Do you mean to say that if I TRY this by marking a field as MacRoman or
Latin1 and it does not crash, then I may be able to store 8-bit character
strings in V2?
> I am not sure if supported "ASCII"
>
> May be such encoding will work. With UTF8 is problem that it have
> non-predicated lengths in bytes for different languages.
>
More information about the Valentina
mailing list