[V4RB] VVarchar and Language

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Dec 8 23:14:44 CST 2004


On 12/8/04 10:55 PM, "jda" <jda at his.com> wrote:

>>  How would I specify the language if using SQL to create the table?
>>> 
>>>  CREATE TABLE myTable (Description Varchar(504))
>>> 
>>>  Final question:
>>>  What is the default language when none is specified?
>> 
>> For UTF16 it practically does not mater.
>> 
>> Try just do nothing :-)
>> and see if this works for you.
>> 
> 
> One caveat -- I think we agreed that the length parameter is in
> bytes, not characters, regardless of whether UTF-16 or UTF-8 is used
> as the storageEncoding. This is to avoid confusion as to how much
> memory is actually allocated when we use different encodings. Is this
> correct?

No Jon.

After discussion on list we have think here more on this.
It is better to use chars. This is more natural way.
This follow to SQL92 standard also.

We have check other respected DBMS vendors, we have read their docs.
Nobody use bytes. And who use unicode also get NOT easy rules.

We offer next rules:

 UTF16                    N chars. Each char is 2 bytes
                          N chars = 2*N bytes

 single byte encodings    N chars. Each char east 1 byte
 such as                  N chars = 1*N bytes
    Latin1, 
    Cyrilic 1251
    ...

EXCEPTION:
    
    UTF8                  N bytes = N chars   for Western
                          N bytes = N/2 chars for others


-- 
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