I'm certified sick this week, but lying in bed without doing anything is too boring, so I played a little bit with encoding-detection and code-conversion.
I have adapted
mozillas encoding-detection for C::B.
The recognition seems to be much better.
After some other tweaking (among others using the idea behind dmoore's suggestions about not using wxCSConv if possible), I was able to speed up the loading of
xmltest.cpp (blown up to 3,5 MB with multiple copies of it's content) from about 31 seconds to about 2,5 seconds.
I'm currently working on a patch that can be uploaded for others to test.
Needs some (much) code-cleanup, but if it's ready, I will put it onto my server (it's too large for an attachement, I think, because of the encoding-detection code).
EDIT:I just tested another very large (this time UTF-8 file):
loadtime decreased from 82 seconds to less than 3 !!