I have CSV file with special characters ØÅÆ When I use fgetcsv, it just ignores the rest of the string. I tried var_dump for the row, but I got it like this: ���
This is the code that I have:
if (($handle = fopen($path, "r")) !== FALSE) {
while (($data = fgetcsv($handle, 0, ",")) !== FALSE) {
var_dump($data); die;
}
fclose($handle);
}
I tried adding this before my code setlocale(LC_ALL, 'en_US.UTF-8');
but without any luck. Do you have any advice?
Some sample data - first row from CSV:
VAR,E,5704617332886,500,11,"TURKISøåæØÅÆ","110"
The proper encoding should be ISO-8859-1. That was the problem