Skip to content

Commit a4dac99

Browse files
committed
only send utf8 to terminal
1 parent 5e54a91 commit a4dac99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cargo-espflash/src/monitor.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ pub fn monitor(mut serial: SystemPort) -> serial::Result<()> {
9797
}?;
9898
if read_count > 0 {
9999
let data: Vec<u8> = normalized(buff[0..read_count].iter().copied()).collect();
100-
stdout.write_all(&data).ok();
100+
let data = String::from_utf8_lossy(&data);
101+
stdout.write_all(data.as_bytes()).ok();
101102
stdout.flush()?;
102103
}
103104
if poll(Duration::from_secs(0))? {

0 commit comments

Comments
 (0)