Hi Mark,
The errata on lines 316 and 317 are $messages = preg_replace('|??|Uis',"\n||NOUSnn",$messages); // remove garbage characters.
$messages = preg_replace('|?|Uis','',$messages); // remove garbage characters
in your source. But.. the ISO-8859-1 source in the distribution has those lines as $messages = preg_replace('|ÿÿ|Uis',"\n||NOUSnn",$messages); // remove garbage characters.
$messages = preg_replace('|ð|Uis','',$messages); // remove garbage characters
(note that your copy has those characters replaced by '?' and that is what is causing the issue)
I'd suggest you either replace your source from the distribution, or just comment out those two lines. They were included long ago when the txt message feed was much more polluted with odd characters, which doesn't seem to be the case now.