Comments (3)
Yes, it's correct. That should not happen.
As ICAO 9303-3 3.4 says:
"The name of the holder is usually represented in two parts, the primary identifier and the secondary identifier."
So I think that the right thing to do, in case of getting only one identifier, would be to report it as a warning.
Also, thanks to your report, I discovered that something similar happens in mrz.generator. When the primary identifier is not given, an incorrect output is got. For example:
from mrz.generator.td3 import TD3CodeGenerator
print(TD3CodeGenerator("P", # Document type
"Utopia", # Country
"", # Surname(s)
"Anna María", # Given name(s)
"L898902C3", # Passport number
"UTO", # Nationality
"740812", # Birth date
"F", # Genre
"120415", # Expiry date
"ZE184226B")) # Id number
This wrong output is got:
P<UTO<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<<<<<<<<<
L898902C36UTO7408122F1204159ZE184226B<<<<<10
Next week I'll work to try to fix it
Thank you very much for your feedback
from mrz.
Thanks,
Also, the first example MRZ, is an instance of another false-positive, where optional data hash
fails when optional-data is empty (all <
) and optional-data-hash is <
(instead of 0
). I think it may be an error according to specs, but exists in real-world.
from mrz.
@tahajahangir , hi again!
_fields method at the beginning was very simple... then, little by little, I added more checks. That's why it had several errors. I almost rewritten it from scratch. I've tested it again and I think it works fine now, but if you find something wrong, I would appreciate it if you told me
Thank you so much!
PS: I have created a new issue with the 2nd problem you have reported.
from mrz.
Related Issues (20)
- Code not executed after checker returns False HOT 4
- Error while running file
- Mrz on windows: very slow the 1st time only HOT 1
- Optional data hash is checked even if optional data is empty HOT 10
- Issue with georgia passports (td1) HOT 2
- Add callback to optionally "repair" fields HOT 5
- Undefined variable 's' in Precheck method HOT 2
- NLD ID optional data hash HOT 2
- README before creating an issue or asking by email HOT 1
- Two letter country code HOT 6
- Installation error: pip install mrz HOT 1
- Empty optional data field and empty optional data hash in TD3 format will result in a invalid hash in the TD3CodeChecker HOT 1
- parser: Document number checksum on Estonian ID Cards is "<" HOT 1
- No module named 'examples.functions' HOT 1
- Wrong country code for Interpol
- Does code take into account some (US) passports have 5-6 check digits at the end of line 2?
- For TD3 checker, Name is blank if surname not present in MRZ text
- how to generate image HOT 3
- Mrz
- Tutorial how to use?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mrz.