Closed jellevanwezel closed 4 years ago
Yes, it's correct.
Germany (Deutchland) is an exception according to ICAO documentation (page 24).
You can check it yourself by searching Google images
Eg:
The thing is that the documentation is confusing now, because it says it expects 3 letters while in reality only for Germany it wants 1 letter.
class TD3CodeGenerator(_Fields, _TD3HashGenerator, _TD3HolderName):
"""Calculate the string code of the machine readable zone for official travel documents of size 3 (passports)
Params:
document_type (str): Normally 'P' for passport
--> country_code (str): 3 letters code (ISO 3166-1) or country name (in English)
surname (str): Primary identifier(s)
given_names (str): Secondary identifier(s)
document_number (str): Document number
nationality (str): 3 letters code (ISO 3166-1) or country name
birth_date (str): YYMMDD
sex (str): Genre. Male: 'M', Female: 'F' or Undefined 'X'
expiry_date (str): YYMMDD
optional data (str): Personal number. In some countries non-mandatory field. Empty string by default
transliteration (dict): Transliteration dictionary for non-ascii chars. Latin based by default
force (bool): Disables checks for country, nationality and document_type fields.
Allows to use 3-letter-codes not included in the countries dictionary
and to use document_type codes without restrictions.
"""
ICAO doc:
CODES FOR NATIONALITY, PLACE OF BIRTH, LOCATION OF ISSUING STATE/AUTHORITY AND OTHER PURPOSES Part A — Letter Codes The following are the two- and three-letter codes for entities specified and regularly updated in [ISO 3166-1], with extensions for certain States and organizations being identified by an asterisk. The current version of the codes may be obtained from the [ISO 3166] maintenance agency - [ISO 3166/MA], ISO’s focal point for country codes.
Then we will have to complain to ICAO :)
It's just an exception, my friend... just that (like United Kingdom "GB")
Regards!
Oke, I won't further press the issue. Thanks for responding!
In the list of countries (
mrz/base/countries
), all countries are denoted with 3 letters except Germany which is denoted with the single letterD
while acording to: ISO_3166-1 it should beDEU