cpstrnew branch (was Re: [fpc-devel] Freepascal 2.4.0rc1 released)

Marco van de Voort marcov at stack.nl
Wed Nov 11 11:28:56 CET 2009

In our previous episode, Martin Schreiber said:
[ Charset ISO-8859-1 unsupported, converting... ]
> On Tuesday 10 November 2009 21:38:33 Marco van de Voort wrote:
> >
> > The only problem is the db-aware part and the few other widgets that can
> > have 100000 elements and more, like treeview. There mass conversion can
> > hurt, e.g. when loading the data into the widget.
> >
> That's the reason why MSEgui stores DB strings as UnicodeString in 
> tmsebufdatset and the other DB access components. Converting utf-8 -> 
> utf-16 -> utf-8 once while receiving/sending the data over the wire is fast 
> compared to the data transmission, "you will not notice the small 
> difference". ;-)

Who says db is over a wire? It could be a local socket. But I haven't
benchmarked it, it is just the only scenario that I can think off that is
noticable, if your widgets are constructed so that always only the visible
set of items is copied to the widgetset. (then it doesn't matter if the
widgetset is utf8 or utf16)

> The MSEgui list and tree components store stringdata as UnicodeString of 
> course.

I don't see the "of course". It would not be my choice for non-visual and/or
many nodes containing classes.

More information about the fpc-devel mailing list