@@ -261,11 +261,11 @@ impl<'a> Printer for InteractivePrinter<'a> {
261261 return Ok(());
262262 }
263263 ContentType::UTF_16LE => UTF_16LE
264− .decode(&line_buffer, DecoderTrap::Strict)
265− .unwrap_or("Invalid UTF-16LE".into()),
264+ .decode(&line_buffer, DecoderTrap::Replace)
265+ .map_err(|_| "Invalid UTF-16LE")?,
266266 ContentType::UTF_16BE => UTF_16BE
267− .decode(&line_buffer, DecoderTrap::Strict)
268− .unwrap_or("Invalid UTF-16BE".into()),
267+ .decode(&line_buffer, DecoderTrap::Replace)
268+ .map_err(|_| "Invalid UTF-16BE")?,
269269 _ => String::from_utf8_lossy(&line_buffer).to_string(),
270270 };
271271