Fix console field width calculation.
Fix string-cleaning code. Would hang on invalid UTF-8.