[wx-dev] How about UTF-8-internally-on-demand?,
RFC: UTF-8build mode for wx
Armel Asselin
asselin.armel at wanadoo.fr
Wed Feb 14 15:10:54 PST 2007
>> > Now I'm confused as I thought you'd need to do that anyway.
>>
>> As I said, we only need to provide two implementations of the parts of
>> wxString that are different in the two builds, not the entire
>> wxString class.
>>
>> > to do the same under Windows and Unix, then you'll need
>> > two versions of Insert() and two versions of Length().
>>
>> Not really, I'll just need two versions of some
>> GetIteratorToPosition() helper function (or something like that) and
>> then I could implement both Length() and Insert() in terms of it.
>
> If you want the UTF-8 version to be efficient, I have doubts
> that the approach will work (I mean it will work, but you'll
> probably want speed optimisations for many UTF-8 methods).
> Maybe I'm wrong.
IMNSHO you are right. that's why i'm trying to explain why multiplying the
algorithmic complexity of all algos by O(n) is a bad idea [not to mention
the increase of code size].
Armel
More information about the wx-dev
mailing list