In a web application, we allow users to add data by uploading CSV files.
Sometimes the fields in these CSV files contain special characters such as, for example, François.
When they contain these the upload often fails as the name field is a key field in the uploaded file and those fields return as empty.
We have set the form encoding using
<form accept-charset="UTF-8">
and the page itself is encoded UTF-8 with
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
but the uploaded file still "fails".
As a test we also tried using
utf8_encode();
on the fields in question but the same problem occurs.
If the same uploaded file is encoded as UTF-8 by the end user before upload then it works fine but most of our users are not very technical so we may as well talk an alien language as try to get them to set the encoding on the upload file so is there any other way we can handle this whereby we can force/convert all uploaded files to be in UTF-8?