V4RB, Jon, project /// More explanation.

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Sep 15 20:51:32 CDT 2004


On 9/15/04 8:44 PM, "erne" <ernestogiannotta at tiscalinet.it> wrote:

>> -------------------
>> Everything is simple, guys.
>> 
>> 
>> I offer you to remember such rules:
>> 
>> * if you use UTF16, and you make some
>> 
>> Vstring(50)     -- this is 50 chars
>> VarChar(50)     -- this is 50 chars
>> Text            -- unlimited
>> 
>> in this case Valentina allocate on disk bytes
>> 
>> Vstring(50)     -- 50 * 2 = 100 bytes on disk
>> VarChar(50)     -- 4KB+ pages.
>> 
>> 
>> * if you use any other encoding then you use single byte encoding.
>> And in this case if you say
>> 
>> Vstring(50) -- you reserve 50 bytes on disk.
>> 
>> if your chars eat one byte, then you get 50 chars.
>> if your chars eat 2 bytes then you get 25 chars.
>> 
>> So if you will think in bytes then everything is clear.
>> 
> 
> not at all!!
> 
> you just stated that Vale will convert those 1 byte chars to 2 bytes UTF16
> internally and thus consume all 50 bytes for 25 chars only

Erne,

Let me underline.

In the RAM Valentina allocate buffers always 2 bytes per char.

But when it write info to disk it CONVERT to encoding which you have
specify.

When you say String(50) -- you talk here about 50 bytes on disk.





-- 
Best regards,
Ruslan Zasukhin      [ I feel the need...the need for speed ]
-------------------------------------------------------------
e-mail: ruslan at paradigmasoft.com
web: http://www.paradigmasoft.com

To subscribe to the Valentina mail list go to:
http://lists.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------



More information about the Valentina-beta mailing list