We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c17117d commit 6d04d5fCopy full SHA for 6d04d5f
src/sdiff.rs
@@ -69,7 +69,9 @@ pub fn main(opts: Peekable<ArgsOs>) -> ExitCode {
69
// ok, now we start running over the lines and get the lines right
70
// and left file
71
for i in 0..max_lines {
72
- let left = lines_left.get(i).map(|l| String::from_utf8_lossy(l)); // we can convert this is ut8?
+ // now we convert the bytes to utf8. May the file is encoded with invalid chars,
73
+ // so it can result in a line with �.
74
+ let left = lines_left.get(i).map(|l| String::from_utf8_lossy(l));
75
let right = lines_rght.get(i).map(|r| String::from_utf8_lossy(r));
76
77
match (left, right) {
0 commit comments