stdout and stderr rewriter for non utf-8 shells