mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
cat: write_nonprint_to_end: be more explicit about printing '?'
This commit is contained in:
parent
4676924532
commit
3bbfe00791
1 changed files with 2 additions and 2 deletions
|
@ -588,10 +588,10 @@ fn write_nonprint_to_end<W: Write>(in_buf: &[u8], writer: &mut W, tab: &[u8]) ->
|
|||
9 => writer.write_all(tab),
|
||||
0..=8 | 10..=31 => writer.write_all(&[b'^', byte + 64]),
|
||||
32..=126 => writer.write_all(&[byte]),
|
||||
127 => writer.write_all(&[b'^', byte - 64]),
|
||||
127 => writer.write_all(&[b'^', b'?']),
|
||||
128..=159 => writer.write_all(&[b'M', b'-', b'^', byte - 64]),
|
||||
160..=254 => writer.write_all(&[b'M', b'-', byte - 128]),
|
||||
_ => writer.write_all(&[b'M', b'-', b'^', 63]),
|
||||
_ => writer.write_all(&[b'M', b'-', b'^', b'?']),
|
||||
}
|
||||
.unwrap();
|
||||
count += 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue