bytes or chars ?

Ruslan Zasukhin sunshine at public.kherson.ua
Thu Sep 16 17:00:06 CDT 2004


On 9/16/04 4:45 PM, "Robert Brenstein" <rjb at robelko.com> wrote:

> Okay, it seems that I missed the fact that the end discussion was
> whether to have a different specification for UTF8 and others. Here
> we are in agreement. Whatever the decision is, the field limits
> should use same unit regardless of type of field or encoding.
> 
> It seems, according to another post in this renewed thread, that even
> for UTF16 the char-bytes issue is not clear and it is more messy for
> UTF8 than I thought (admitedly I haven't gotten into UTF business
> much yet but it is looming on me).
> 
> My question was whether there is really no way to stay with
> characters. I understand that this would mean more work for Ruslan

Problem not in our work, Robert.
This is not possible.

> but it sounds that otherwise many of us will be redoing the same
> char-byte count recalculation over and over in our environments.


> If bytes must be for UTF8, then I resign to having bytes all over the
> place. BUT... then kernel must be able to tell me how many bytes as
> well as how many chars are actually in each field. I want also
> built-in functions that allow me to make char-byte count conversions
> for my GUI. We seem to agree that aside from storage, we will
> continue to deal with characters.

If we decide that property

    Vfield.MaxLenth must be in bytes, then it will return you bytes.

Then I think better to use

    Vfield.MaxBytes -- this is on disk...


Robert, in fact we should not have nothing special in kernel.
In REALbasic we will return Strings. It self know its encoding, length in
chars and so on.

What about Revolution? It support unicode already?
In any case we return to environment a string in the format which that
environment understands. So you simply work with your native strings.


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