plain codec should filter invalid characters
multiline filter now catches exceptions