From d2f06f98be5543d52503e647c1d935c278f9e426 Mon Sep 17 00:00:00 2001 From: Tuukka Tolvanen Date: Wed, 12 Aug 2026 03:01:07 +0300 Subject: [PATCH 1/2] Test unexpected eu.at_02.compact result --- stdnum/eu/at_02.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdnum/eu/at_02.py b/stdnum/eu/at_02.py index 610ef615..022c48ab 100644 --- a/stdnum/eu/at_02.py +++ b/stdnum/eu/at_02.py @@ -32,6 +32,8 @@ 'ES2300047690558N' >>> compact('ES++()+23ZZZ4//7690558N') 'ES23ZZZ47690558N' +>>> compact('mt50zzz670169305t') # EPC262-08 Version 12.0 / 8.1.15 Malta, example identifier, lowercased +'T50ZZZ670169305T' >>> calc_check_digits('ESXXZZZ47690558N') '23' """ From 4046b3d1e138089ec5495999e3f7982bc5c8d7a5 Mon Sep 17 00:00:00 2001 From: Tuukka Tolvanen Date: Wed, 12 Aug 2026 02:59:57 +0300 Subject: [PATCH 2/2] Strip comma instead of keyboard-adjacent m when compacting CID --- stdnum/eu/at_02.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdnum/eu/at_02.py b/stdnum/eu/at_02.py index 022c48ab..60b51643 100644 --- a/stdnum/eu/at_02.py +++ b/stdnum/eu/at_02.py @@ -33,7 +33,7 @@ >>> compact('ES++()+23ZZZ4//7690558N') 'ES23ZZZ47690558N' >>> compact('mt50zzz670169305t') # EPC262-08 Version 12.0 / 8.1.15 Malta, example identifier, lowercased -'T50ZZZ670169305T' +'MT50ZZZ670169305T' >>> calc_check_digits('ESXXZZZ47690558N') '23' """ @@ -52,7 +52,7 @@ def compact(number: str) -> str: """Convert the AT-02 number to the minimal representation. This strips the number of any valid separators and removes invalid characters.""" - return clean(number, ' -/?:().m\'+"').strip().upper() + return clean(number, ' -/?:().,\'+"').strip().upper() def _to_base10(number: str) -> str: