-
Notifications
You must be signed in to change notification settings - Fork 9
Allow to change the strategy to handle encoding/decoding errors #86
Copy link
Copy link
Closed
Labels
enhancementsomething nice to have but it is not neither critical nor urgentsomething nice to have but it is not neither critical nor urgent
Milestone
Description
Describe the feature you'd like
If an example prints arbitrary data, there is no way to avoid a unicode encoding/decoding error.
Instead of failing, byexample could replace the offending bytes with something else (even delete them). This strategy could be set from the same --encoding parameter.
See in Python 3 help(str.encode) and the man page of Python about PYTHONIOENCODING.
Make the change backward-compatible.
Additional context (optional)
Is strict, the current strategy, the best as default? We could change it too to backslashreplace
If we choose this last one, we should add a note or warning if we perform the replace op following the line of #77 (how to detect the replacement, no idea!)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementsomething nice to have but it is not neither critical nor urgentsomething nice to have but it is not neither critical nor urgent