Recode icon indicating copy to clipboard operation
Recode copied to clipboard

Feature: --ignore-invalid

Open epa opened this issue 7 years ago • 1 comments

Sometimes recode dies with 'Invalid input'. An --ignore-invalid flag would do whatever needed to skip over junk bytes in the input, recovering whatever valid text can be found. Of course, there is more than one way to decide what to skip when decoding a multibyte encoding, so it would have to pick something broadly sensible.

I'm not envisaging a fully specified decoding for all possible junk input sequences in all possible encodings, just a best effort to extract whatever usable text remains. For UTF-8, having just read an invalid byte sequence, it could discard the first byte of the sequence and try again.

epa avatar Nov 08 '17 13:11 epa

I have taken over the project at https://github.com/rrthomas/ Feel free to refile the feature request there.

rrthomas avatar Jan 19 '18 00:01 rrthomas