Fix: Bank-Import ISO-8859-1 nach UTF-8 konvertieren (Comdirect-Umlaute)
This commit is contained in:
parent
02c642e53e
commit
db831ed244
1 changed files with 5 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue