Fix how replacement marks are printed in bogus utf-8 sequences. Fixes bug 2579