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