Unicode, Set up for MC 2.4.3 on Mac OS9.1?
Ruslan Zasukhin
sunshine at public.kherson.ua
Mon Apr 7 20:15:08 CDT 2003
on 4/7/03 7:34 PM, Charles Yeomans at yeomans at desuetude.com wrote:
>>>> But I wonder, what you say about this way:
>>>>
>>>> -- We simply add 2 more languages for String and Text fields.
>>>> "UTF-8" and "UTF-16"
>>>>
>>>> -- at least for 1.x version.
>>>>
>>>> -- for UTF16, if you say VarChar[504] then
>>>> GetMaxStringLength() will return 257 chars.
>>>>
>>>
>>> what GetMaxStringLength() will return for UTF8?
>>
>> :-) good question.
>>
>> Well, I think it is correct to return 504,
>> Because this is MAXIMUM possible number.
>> But we can have less chars also.
>
>
> I think that MaxLength should return the length in bytes, as it always
> has.
No, you mean GetBytes(), this function really will return 504.
In fact I have confuse you,
function GetMaxText() exists only in C++
> If Valentina will be computing the length of UTF-8 text, then
> perhaps that value could be stored and returned in a new function
> CharCount. Otherwise, since the developer will be choosing the format,
> it's reasonable to let him worry about computing the character count,
> especially for UTF-8 text, for which this is an O(N) operation.
Yes, may be this is not deal of Valentina ...
Again, in c++ deeply in kernel, I use it to know what buffer pre-allocate.
--
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://listserv.macserve.net/mailman/listinfo/valentina
-------------------------------------------------------------
More information about the Valentina
mailing list