Skip to content

Fix birthdate conversion issue in EFDG11#40

Open
AhSem wants to merge 1 commit intoZeroPass:masterfrom
AhSem:fix-full-birthdate-conversion-in-efdg11
Open

Fix birthdate conversion issue in EFDG11#40
AhSem wants to merge 1 commit intoZeroPass:masterfrom
AhSem:fix-full-birthdate-conversion-in-efdg11

Conversation

@AhSem
Copy link

@AhSem AhSem commented Apr 2, 2025

Using Malaysia's passport, parsing the birthdate in EFDG11 is giving error. Upon checking, the value read is in Uint8List with 4 elements, which is a binary coded date.
I am not entirely sure if all MRTD document's birthdates are binary coded, so I apply a length checking on the birthdate value. If it is 4 bytes (length of 4), then it is likely to be binary coded and therefore attempt to convert it accordingly. Otherwise, it will fallback to the original date conversion using String.fromCharCodes

@nombrekeff
Copy link

I need this also. For spanish passport it also fails.

@AhSem
Copy link
Author

AhSem commented Jun 19, 2025

You may fork the original repo and apply the pull request changes submitted. I am not entirely sure if my pull request can fix for all passports. At least now it is working for Malaysia passport. Let me know if it doesn't solve Spanish passport.

@nombrekeff
Copy link

nombrekeff commented Jun 19, 2025 via email

@lukapercic
Copy link

lukapercic commented Jul 25, 2025

Thank you for PR, we will fully test it for other passports when we find time/funding, and merge then.

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.

3 participants