V4RB, Jon, project

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Sep 15 00:39:20 CDT 2004


On 9/15/04 12:24 AM, "jda" <jda at his.com> wrote:

>> ----------
>> NEWS: so we can think about them.
>> 
>> We have realize that Valentina Developers should AVOID utf-8 !!!
>> 
>> IF you want single byte then use your native language encoding.
>> E.g. Latin-1
>> 
>> If you want unicode, then use UTF16.
>> 
> 
> Why? UTF-8 is the "native" format for RB.

I new you will say this.

> It also, for Western
> languages, usually requires only a little more storage than UTF-16.
> Then what makes it a bad choice for Valentina Developers (especially
> RB ones)?

Right, and for e.g. Cyrillic it will eat 2 bytes per char.

So what we get then?

    If they all make Vstring(50) as UTF16
    then they all can store 50 chars.

    German/USA developer make Vstring(50) as Latin1
        he can store here really 50 chars of English or German

    Russian developer make Vstring(50) as Cyrilic-win
        he can store here only 50 chars.

    German/USA developer make Vstring(50) as UTF8
        he can store here really 50 chars of English or German

    Russian developer make Vstring(50) as UTF8
        he can store here only 25 chars.    <<<<<<<<<<< OPS


Non - consistence.

We want and we think this is correct to write in docs

    Vstring( MaxCharsCount )


Problem of UTF8 is that can have variable length of bytes per chars.
We cannot guarntee to you that if you make UTF8 Vstring(50)
Then you will be able store here 50 chars in any language.

At last of end, why we use unicode?
To be able store any language.

If you want store only German or only English then use Latin1.
If you really want store any language then use UTF16.


-------
It is never mind that REALbasic use UTF8.
We talk about storage to disk.

We have discuss this deeply here.
Vstring -- cause the most big problem for UTF8
VarChar -- so so. IF you will write strings close to max limit you again may
not fit into declared size.
Vtext -- do not have problems.


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