Как-то так
$f = fopen($filename, "r");
// Читать построчно до конца файла
while (!feof($f)) {
$r = fgets($f);
if ($encoding != 'UTF-8') {
$r = mb_convert_encoding($r, 'UTF-8', $encoding);
}
chop($r);
if (!$r) {
continue;
}
$arr = preg_split('/;/', $r);
if (!is_array($arr)) {
continue;
}