Code
Marks made for a machine to read — barcodes from the shop to the post, QR codes, a passport’s lines — made and read with their structure shown.
Machine-Readable Zone
Reads the machine-readable zone of a passport (TD3), an identity card (TD1, TD2) or a visa (MRV-A, MRV-B) as ICAO Doc 9303 defines it: its fields named, each check digit worked by the weights 7, 3, 1, and a failed check answered with the characters that would mend it. Makes a zone from its fields, a name written by Doc 9303’s tables of Latin and Cyrillic characters.
History, how it works, how it was checked, limits
History
ICAO’s Doc 9303 gives a travel document a zone a machine reads: two lines on a passport, two or three on an identity card, two on a visa. Its Eighth Edition (2021) holds each layout in Parts 4 to 7 and the common rules in Part 3: the characters, the filler <, the check digit, and the tables for writing a national name in the zone’s letters. Its specimens are issued by Utopia, a State kept for examples.
How it works
The lines’ number and length name the layout: two of 44 a passport or a visa, two of 36 a TD2 document or a smaller visa, three of 30 an identity card. Each field is cut from its positions and named; a date is YYMMDD. Each check digit is its characters’ values, digits as themselves, A to Z as 10 to 35 and the filler as 0, weighted 7, 3, 1 in turn, summed, modulo 10. Where one fails, every single character is changed to every other a field allows and the changes that make all the checks hold are listed. A zone is made from its fields the same way, a name written by Table A for Latin letters and Table B for Cyrillic, with its exceptions by language.
How it was checked
Doc 9303 Part 3’s worked check digits, 520727 and AB2134<<<; every specimen zone of Parts 3 to 7 read with its checks holding; Part 3’s passport zone made again from its fields, character for character; a long document number of Part 5’s note j made and read back.
The tests hold 15 checks of this tool; 9 rest on outside material, the first eight here:
- A standard’s own vectors Doc 9303 Part 3, Appendix A, examples 1 and 2: 520727 takes the check digit 3; AB2134<<< sums to 125 and takes 5
- A standard’s own vectors Doc 9303’s specimen zones (Part 3 Figure 1, Part 4 Appendix A, Part 5, Part 6, Part 7 MRV-A and MRV-B) read in their layouts with every check digit holding
- A standard’s own vectors … the name read as Doc 9303 Part 4 §4.2.3 writes it, and the composite check over the lower line’s 1–10, 14–20 and 22–43
- A standard’s own vectors Doc 9303 Part 3 Figure 1’s zone made again from its fields, every check digit computed
- A standard’s own vectors Doc 9303 Part 5, note j: a document number of twelve characters, its first nine in 6–14, a filler for the check digit, the rest and its check digit in the optional data; read back whole
- A standard’s own vectors Doc 9303 Part 3 §6, Table A: Å as AA and Ö as OE (the first forms), Ñ as N; with the second form chosen, Ö as O
- A standard’s own vectors Doc 9303 Part 3 §6, Table B: Cyrillic by its main column, and Ukrainian’s exceptions (Г as H, Ю as YU at a word’s start)
- A standard’s own vectors Doc 9303 Part 6, note j: a TD2 document number of twelve characters, its first nine in 1–9, a filler, the rest and its check digit in the optional data, read whole with every check holding (the review found it read as failing)
The other 1, and every tool’s checks
Limits
A zone is read from text, not from a photograph. A date’s century is not given, the zone giving none. Arabic names are not written, their table being informative. A name too long for its field is cut at its end, one of the methods Doc 9303 allows. A boarding pass’s barcode is not read: its fields are in IATA’s Resolution 792, which is sold. Nothing typed is kept.