From 63f738be964c0a2cf8968b4151cc5f856b194515 Mon Sep 17 00:00:00 2001 From: Rool Paap Date: Wed, 22 Sep 2021 12:27:08 +0200 Subject: [PATCH] 1938: Fixed Identity Checker. (missing a J in the alphabet) --- CTRTests/Infrastrucure/Services/IdentityCheckerTests.swift | 3 ++- Sources/CTR/Infrastructure/Services/IdentityChecker.swift | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CTRTests/Infrastrucure/Services/IdentityCheckerTests.swift b/CTRTests/Infrastrucure/Services/IdentityCheckerTests.swift index 7854c924b..9bdca754d 100644 --- a/CTRTests/Infrastrucure/Services/IdentityCheckerTests.swift +++ b/CTRTests/Infrastrucure/Services/IdentityCheckerTests.swift @@ -275,7 +275,8 @@ class IdentityCheckerTests: XCTestCase { "Rool": "R", "rool": "R", " rool": "R", - "-rool": "R" + "-rool": "R", + "Jan": "J" ] for (value, expected) in values { let identity = EventFlow.Identity(infix: nil, firstName: value, lastName: nil, birthDateString: nil) diff --git a/Sources/CTR/Infrastructure/Services/IdentityChecker.swift b/Sources/CTR/Infrastructure/Services/IdentityChecker.swift index 9394c1d68..d64a5b552 100644 --- a/Sources/CTR/Infrastructure/Services/IdentityChecker.swift +++ b/Sources/CTR/Infrastructure/Services/IdentityChecker.swift @@ -170,7 +170,7 @@ extension EventFlow.Identity { class Normalizer { static let permittedCharacterSet = CharacterSet(charactersIn: "abcdefghijklmnopqrstuvwxyz ") - static let initialsCharacterSet = CharacterSet(charactersIn: "ABCDEFGHILKLMNOPQRSTUVWXYZ") + static let initialsCharacterSet = CharacterSet(charactersIn: "ABCDEFGHIJKLMNOPQRSTUVWXYZ") static let filterCharacterSet = CharacterSet(charactersIn: "-' ") /// Normalize any input, transform to latin, remove all diacritics