Closed jellevanwezel closed 4 years ago
Hi @jellevanwezel !
Oops! Yes, it's a bug. It seems that I read the "F" note quickly and badly (my English is very bad, although the worst part is that the document is available in my language xD)
As always, thank you very much!
PS: I'll fix it as soon as I can, but have you not thought about creating your own PR?
Fixed!
Finally it will work as follows:
Chars X
, x
, <
and ""
(empty string) returns <
, otherwise a SexError
will rise
Chars M
, F
or <
returns True
, False
otherwise
Thanks
According to page 14 of this ICAO document: https://www.icao.int/publications/Documents/9303_p5_cons_en.pdf
Sex in the MRZ can be:
M
for male,F
for female, and<
for nonspecified. However, the generator puts in aX
for nonspecified instead of a<
.This is correct for the VIZ as can be seen in the same document at page 11. But not for the MRZ.
The document refers to TD1 but it also aplies for the other document types: