4 ms·
We used to use that in 'production' to clean up CSVs that got exported with a weird byte at the beginning
by EamonnMR 6y ago
We used to use that in 'production' to clean up CSVs that got exported with a weird byte at the beginning
- dr_zoidberg 6y agoAre you sure that weird byte at the begining is not a Unicode BOM (Byte-Order-Mark)? I've seen a few programs do that (or expect it) and other programs ignore it or go crazy on it.
- sk5t 6y agoPerhaps the weird byte(s?) were a BOM?
- m000 6y agoWhy would you need anything more than a sed oneliner in your shell rc? utf8-debom() {local SED=gsed; $SED -i '1s/^\xEF\xBB\xBF//' $@}