title: User submitted CSV file upload UTF-8 concern
body: <p>I have a feature that uploads a user submitted CSV file into my database using <code>fgetcsv</code> etc.</p>
  
  <p>My database has a collation of utf8_general_ci and the website charset is set to utf-8.</p>
  
  <p>How can I ensure that when inserting the data from CSV into my database for display on the website, the correct encoding is set?</p>
  
  <p>Do I have to test every string using something like <code>mb_detect_encoding</code> (seems a bit memory intensive) or can I just <code>utf8_encode</code> the whole string. Or should I not be worrying at all?</p>