Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for North Macedonia TIN #330

Closed
wants to merge 1 commit into from
Closed

Conversation

unho
Copy link
Contributor

@unho unho commented Sep 18, 2022

Note that this is implementation is mostly based on unofficial sources describing the format, which match the hundreds of examples found online.

Also note that the algorithm for the check digit was tested on all found examples, and it doesn't work for all of them, despite those failing examples don't seem to be valid according to the official online search.

Closes #222.

@unho unho force-pushed the mk-tin branch 5 times, most recently from 6f6b3b9 to c7f6962 Compare September 18, 2022 11:28
Note that this is implementation is mostly based on unofficial sources
describing the format, which match the hundreds of examples found online.

Also note that the algorithm for the check digit was tested on all found
examples, and it doesn't work for all of them, despite those failing examples
don't seem to be valid according to the official online search.

Closes arthurdejong#222.
@unho
Copy link
Contributor Author

unho commented Sep 18, 2022

@arthurdejong I really don't understand why this test fails. Maybe you can shed some light?

@arthurdejong
Copy link
Owner

Thanks @unho for providing this. I've modified the stripping of the "MK" prefix to work with ASCII, Cyrillic, Python 3 and Python 2 (both unicode strings as well as bytestrings). It turns out that bytestring(unicodestring) doesn't work in all cases in Python 2.

Merged as a261a93

@unho
Copy link
Contributor Author

unho commented Sep 25, 2022

@arthurdejong Thanks a lot for the adjustments!

@unho unho deleted the mk-tin branch September 25, 2022 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add validation for North Macedonia TIN
2 participants