sysopen($fh,$datei,O_WRONLY|O_APPEND|O_CREAT); binmode($fh,':utf8'); ...