Skip to content

Commit 30aaa38

Browse files
holvitolvarthurdejong
authored andcommitted
Strip comma instead of keyboard-adjacent m when compacting CID
Fixes 099078e Closes #508
1 parent 23be163 commit 30aaa38

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎stdnum/eu/at_02.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
'ES2300047690558N'
3333
>>> compact('ES++()+23ZZZ4//7690558N')
3434
'ES23ZZZ47690558N'
35+
>>> compact('mt50zzz670169305t') # EPC262-08 Version 12.0 / 8.1.15 Malta, example identifier, lowercased
36+
'MT50ZZZ670169305T'
3537
>>> calc_check_digits('ESXXZZZ47690558N')
3638
'23'
3739
"""
@@ -50,7 +52,7 @@
5052
def compact(number: str) -> str:
5153
"""Convert the AT-02 number to the minimal representation. This strips
5254
the number of any valid separators and removes invalid characters."""
53-
return clean(number, ' -/?:().m\'+"').strip().upper()
55+
return clean(number, ' -/?:().,\'+"').strip().upper()
5456

5557

5658
def _to_base10(number: str) -> str:

0 commit comments

Comments
 (0)