Fix: Bank-Import ISO-8859-1 nach UTF-8 konvertieren (Comdirect-Umlaute)

This commit is contained in:
fds2610-bot 2026-05-14 19:58:44 +02:00
parent 02c642e53e
commit db831ed244

View file

@ -78,6 +78,11 @@ class BankImportParser
// BOM entfernen
$content = preg_replace('/^\xEF\xBB\xBF/', '', $content);
// ISO-8859-1 → UTF-8 konvertieren wenn nötig
if (!mb_check_encoding($content, 'UTF-8')) {
$content = mb_convert_encoding($content, 'UTF-8', 'ISO-8859-1');
}
// Verschiedene Zeilenenden normalisieren
$content = str_replace(["\r\n", "\r"], "\n", $content);
$lines = explode("\n", $content);