Closed TeofilC closed 2 years ago
This changes a bit more than seems necessary (perhaps for the better). One can hope decodeUtf8With
doesn't crash if it encounters "unprintable bytes". Do you think a test (a little eventlog with some unprintable bytes, non-utf payloads and both) would be reasonably easy to add?
LGTM.
One can hope decodeUtf8With doesn't crash if it encounters "unprintable bytes".
As far as I can see, it never crashes unless you pass a function that crashes, which is not the case here.
Do you think a test (a little eventlog with some unprintable bytes, non-utf payloads and both) would be reasonably easy to add?
That would be great.
I've added a test that contains an event with some non-utf text
Is this ready to merge or would you like anything changed @maoe ?
If @maoe is busy, I can merge once I remember what it's about, but for a release we'd better wait for @maoe.
Sorry for the delay. I'll take a look again tomorrow.
LGTM. Thanks!
Thanks both! Literally no worries about the delay
This keeps behaviour pretty much in line with what we have currently. Instead of failing on non-utf binary payloads, we just replace non-utf8 text with '.' as we do for non-printable characters.
Fixes #90