From d894419de71196e43578d1ef547f924e97a02e7b Mon Sep 17 00:00:00 2001 From: dankl Date: Sat, 12 Oct 2019 21:18:16 +0200 Subject: [PATCH] Fixed Mt940Parser line separator --- .../kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt b/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt index 17392365..ac8f2389 100644 --- a/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt +++ b/fints4javaLib/src/main/kotlin/net/dankito/fints/transactions/mt940/Mt940Parser.kt @@ -75,7 +75,8 @@ open class Mt940Parser : IMt940Parser { protected open fun splitIntoSingleAccountStatements(mt940String: String): List { val accountStatements = mutableListOf() - val lines = mt940String.split("\n") + // MT940 line separator is "\r\n", but i added also "\n" and "\r" cause if parsed from file on Linux or MacOS these are the line separators there + val lines = mt940String.split("\r\n", "\n", "\r") var lastMatchedLine = 0 lines.forEachIndexed { index, line -> if (line == "-") {