title: NULL in CSV file, what encoding to use
body: <p>I have the following to extract data from a CSV into an SQLite db:</p>
  <pre><code>    elif file.endswith('.csv'):
      read_path = os.path.join(dir_read, file)
      with open(read_path,'r',encoding='utf-8') as fin:
          dr = csv.DictReader(fin)
          to_db = [(i['InvoiceNumber'],i['InvoiceType'], i['ChargeType'],i['SupplierID'], i['Net_Amount']) for i in dr]
      
      c.executemany(&quot;INSERT INTO mf (InvoiceNumber, InvoiceType, ChargeType, SupplierID, Net_Amount) VALUES (?, ?, ?, ?, ?) ;&quot;, to_db)
      con.commit()
  </code></pre>
  <p>This works for most of the files I am importing (200 files), but there are a couple with a NUL in one of the fields, this is not one of the fields in the <code>to_db</code>. I can see this in Notepad++, one row has a null all the others have an empty string.
  The error I get is:</p>
  <blockquote>
  <p>_csv.Error: line contains NULL byte</p>
  </blockquote>
  <p>I have tried different encoding (utf-16, le, be), but then they fail on all the other csv files.</p>
  <p>Is there a way to remove these <code>NULL</code> values and replace with a blank string when importing?</p>