56841996 Only attempt to re-encode the lines of the imported CSV file when a

line fails to encode due to an unrecognized character. When re-encoding, firstguesses the encoding using chardet, then decodes the string from that guess,and finally encodes the decoded string as utf-8. Likely also fixes the otherbuts mentioned in the fixed bug.