From 270f1c6c34252176bbd1993ad9f32e7d7a0012c1 Mon Sep 17 00:00:00 2001 From: dankito Date: Mon, 5 Oct 2020 01:29:41 +0200 Subject: [PATCH] Added upper case diacritics --- .../implementierte/sepa/SepaMessageCreator.kt | 89 +++++++++++++------ 1 file changed, 61 insertions(+), 28 deletions(-) diff --git a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt index e4822a77..f05b7466 100644 --- a/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt +++ b/fints4k/src/commonMain/kotlin/net/dankito/banking/fints/messages/segmente/implementierte/sepa/SepaMessageCreator.kt @@ -59,39 +59,72 @@ open class SepaMessageCreator : ISepaMessageCreator { override fun convertDiacritics(input: String): String { return input - .replace("á", "a", true) - .replace("à", "a", true) - .replace("â", "a", true) - .replace("ã", "a", true) - .replace("ä", "a", true) - .replace("å", "a", true) + .replace("Á", "A") + .replace("À", "A") + .replace("Â", "A") + .replace("Ã", "A") + .replace("Ä", "A") + .replace("Å", "A") - .replace("é", "e", true) - .replace("è", "e", true) - .replace("ê", "e", true) - .replace("ë", "e", true) + .replace("á", "a") + .replace("à", "a") + .replace("â", "a") + .replace("ã", "a") + .replace("ä", "a") + .replace("å", "a") - .replace("í", "i", true) - .replace("ì", "i", true) - .replace("î", "i", true) - .replace("ï", "i", true) + .replace("É", "E") + .replace("È", "E") + .replace("Ê", "E") + .replace("Ë", "E") - .replace("ó", "o", true) - .replace("ò", "o", true) - .replace("ô", "o", true) - .replace("õ", "o", true) - .replace("ö", "o", true) + .replace("é", "e") + .replace("è", "e") + .replace("ê", "e") + .replace("ë", "e") - .replace("ú", "u", true) - .replace("ù", "u", true) - .replace("û", "u", true) - .replace("ũ", "u", true) - .replace("ü", "u", true) + .replace("Í", "I") + .replace("Ì", "I") + .replace("Î", "I") + .replace("Ï", "I") - .replace("ç", "u", true) - .replace("č", "u", true) - .replace("ñ", "u", true) - .replace("ß", "ss", true) + .replace("í", "i") + .replace("ì", "i") + .replace("î", "i") + .replace("ï", "i") + + .replace("Ó", "O") + .replace("Ò", "O") + .replace("Ô", "O") + .replace("Õ", "O") + .replace("Ö", "O") + + .replace("ó", "o") + .replace("ò", "o") + .replace("ô", "o") + .replace("õ", "o") + .replace("ö", "o") + + .replace("Ú", "U") + .replace("Ù", "U") + .replace("Û", "U") + .replace("Ü", "U") + .replace("Ü", "U") + + .replace("ú", "u") + .replace("ù", "u") + .replace("û", "u") + .replace("ũ", "u") + .replace("ü", "u") + + .replace("Ç", "C") + .replace("Č", "C") + .replace("Ñ", "N") + + .replace("ç", "c") + .replace("č", "c") + .replace("ñ", "n") + .replace("ß", "ss") }