Unicode, Set up for MC 2.4.3 on Mac OS9.1?
Charles Yeomans
yeomans at desuetude.com
Mon Apr 7 12:34:42 CDT 2003
On Monday, April 7, 2003, at 06:53 AM, Ruslan Zasukhin wrote:
> on 4/7/03 12:33 PM, erne at ernestogiannotta at tiscalinet.it 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. 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.
Charles Yeomans
More information about the Valentina
mailing list