Reject malformed UTF-8 before it reaches your CSV parser
A CSV import can have the right number of columns and still contain damaged text. The damage may happen before the CSV parser receives a string. JavaScript's TextDecoder replaces malformed byte sequences by default. That is useful when displaying imperfect text, but an import workflow may need to reject those bytes instead. Reproduce the difference Run this in a modern browser console or Node.js:…
We haven't written up this one. Dev.to has the full story — the link below goes straight to it.