[V4Rb] Encoding glitch

Charles Yeomans yeomans at desuetude.com
Fri Dec 30 17:54:10 CST 2005


On Dec 30, 2005, at 5:27 PM, jda wrote:

>>
>> I think this is a mistake -- depending on what you have in mind for 
>> IOEncoding -- either you should test for encodings and fit in with 
>> REALbasic, or you should document that V4Rb expects all strings to be 
>> UTF-8.
>>
>
> As for me, I'd just as soon have Valentina expect one encoding 
> (settable, presumably in the IOEncoding preference) to avoid the 
> overhead of checking with each transaction. With the latest 
> improvements in fc2 I've come to realize that string handling in 
> Valentina is one of the bottlenecks in my app (not the worst one, but 
> it has a noticeable effect on performance).

I don't see how it can be avoided as long as Valentina uses UTF-16 and 
REALbasic uses UTF-8.  When support is added for UTF-8 storage, as I 
believe is the case, the overhead of encoding conversion can be 
eliminated.

As for checking encodings, my experience is that checking the encoding 
doesn't cost too much; at the plugin level, it is a function call plus 
integer comparison.

--------------
Charles Yeomans



More information about the Valentina mailing list