This time I've changed the behaviour to be compatible (as much
as possible!) with the original charset handling code. This
should be a drop-in replacement.
Tested with a folder containing a bunch of really ugly buggy
messages, and it creates a cyrus.cache file which is identical
other than a record where I believe that the old code is
incorrect (adding \r\n and some highbit characters to a search
string due to the decoding process)