Tags: kernc/diff-logs
Tags
BUG: Fix runtime on invalid UTF-8 encoding Fixes errors like: utf8 "\xC4" does not map to Unicode at ./diff-logs line 52, <$fh1_in> line ... Malformed UTF-8 character: \xc4\x2e (unexpected non-continuation byte 0x2e, immediately after start byte 0xc4; need 2 bytes, got 1) in substitution (s///) at ./diff-logs line 59, <$fh1_in> line ... Malformed UTF-8 character (fatal) at ./diff-logs line 59, <$fh1_in> line ... The patch simply assumes UTF-8 and ignores any invalid characters, replacing them with \xHH escapes.