From d878ded495b57f19b8483361f91b478ec84de44b Mon Sep 17 00:00:00 2001 From: Jia-Han Wu Date: Sat, 8 Jun 2024 22:42:07 +0800 Subject: [PATCH] fix: exclude asterisk from code39SupportedCharacters The asterisk character is used as the start/stop character in Code 39 barcodes and should not be included in the set of supported characters. --- Sources/Code39/Code39.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Code39/Code39.swift b/Sources/Code39/Code39.swift index c79f5bd..b328aae 100644 --- a/Sources/Code39/Code39.swift +++ b/Sources/Code39/Code39.swift @@ -74,4 +74,4 @@ func encodeToCode39(_ input: String) -> [BarWidth] { return encodedBarcode } -public let code39SupportedCharacters: Set = Set(code39Patterns.keys) +public let code39SupportedCharacters: Set = Set(code39Patterns.keys.filter { $0 != "*" })