Wenn alles nichts hilft, werde ich wohl auf meine aller erste Lösung zurückgreifen müssen. Diese funktioniert bei beiden Eingabe CSVS.
PHP:
$fh = fopen($argv[1], "r") or die ("cannot open file ".$argv[1]."\n");
$fh2 = fopen($argv[1]."neu", "a")or die ("cannot write file ".$argv[1]."neu\n");
if ($fh) {
while (!feof($fh)) {
$bingo = fgets($fh,1048576);
if ($bingo)
{
$felder = ereg_replace("\",","',",$bingo);
$felder = ereg_replace(",\"",",'",$felder);
$felder = str_replace(array("\r", "\n"), '', $felder);
$felder = substr_replace($felder,"'",0,1);
$felder = substr_replace($felder,"'",strlen($felder)-1);
$felder = preg_replace("/[\"]/","\"\"",$felder);
$felder = $felder."\r\n";
$felder = ereg_replace("',","\",",$felder);
$felder = ereg_replace(",'",",\"",$felder);
$felder = ereg_replace("'","\"",$felder);
//echo $felder;
fwrite($fh2, $felder);
}
}
}