utf8_fopen_read.php

<?php
/***
 * Source: http://php.net/manual/en/function.fopen.php#104325
 */

function utf8_fopen_read($fileName)
{
	$fileData = iconv('windows-1250', 'utf-8', file_get_contents($fileName));
	$fd = fopen('php://memory', 'rw');
	fwrite($fd, $fileData);
	fseek($fd, 0);
	return $fd;
}

/**
 * Usage:
 */

$fd = utf8_fopen_read('./file.csv');
while(($data = fgetcsv($fd, 1000, ',')) !== false) {
	foreach($data as $value) {
		echo $value . PHP_EOL;
	}
}