转自Machine Readable Passport Zone
有空来翻译一下吧,挺有意思的。
Machine Readable Passport Zoneby Alan De Smet
The International Civil Aviation Organization, a Quebec based group, developed standards for Machine Readable Travel Documents (MRTDs), including passports and visas. These MRTD make it easy for automated systems to scan a travel document. If a country decides to check all visitors against a known criminals data reading the information automatically with a computer will be much faster and less prone to error than if the immagration agent needs to type the information in by hand.
The MRTD standards are encoded in ICAO Document 9303. Part 1 documents Machine Readable Passports (MRPs). This standard was accepted by theInternational Standards Organization as ISO/IEC 7501-1:1997, ISO/IEC 7501-2:1997, and ISO/IEC 7501-03:1997.
If you're interested in original materials, do not bother with the ISO versions. These $27 documents (well, 34,00 CHF) are are essentially a single page saying, "See ICAO Document 9303". ICAO 9303 is much better and includes several pages documenting the history of the document. It's a bit expensive at$62. You might be able to get it through inter-library loan. I borrowed a copy of the much briefer 3rd edition this way. The 5th edition is much larger (126 pages versus the 30 or so), but I don't access to the 5th edition and am unable to comment on what has been added in the remaining 100 pages.
MRTD's have a Machine Readable Zone (MRZ) at the bottom of them. These MRZes are printed in the monospace font OCR-B. It is printed as "Size 1", which works out to be about 14 point. Further details on the font can be found in ISO Standard 1073-2:1976. The exact location of the MRZ, the type of paper, reflectivity and the like are futher documented in ICAO 9303 and ISO 1831:1980.
On a MR Passport there are two lines. Each line is 44 characters long. There are no blank spaces; where one is necessary is it filled with the filler character, a less than sign (<). Here is an example from ICAO 9303. This person is from the fictional country of Utopia, the country code (UTO) is invalid. I&#39;ve reformatted it to be similar to a United States passport.
PASSPORT
PASSEPORT
PASAPORTE
UTOPIAType / Type / TipoPCode / Code / CédigoUTOPassport No. / No. du Passeport / No. de PasaporteL898902CSurname / Nom / ApellidosERIKSSONGiven names / Prénoms / NombresANNA MARIANationality / Nationalité / NacionalidadUTOPIANDate of birth / Date de naissance / Fecha de nacimiento06 Aug 1969Personal no / no personnelZE184226BSex / Dexe / SexoFPlace of birth / Lieu de naissance / Lugar de nacimientoZENITH, UTOPIADate of Issue / Date de délivrance / Fecha de expedición24 Jun 1989Authority / Autorité / AutoridadPassport OfficeDate of expiration / Date d&#39; expiration / Fecha de caducidad23 Jun 1994Ammendments / Modifications / EnmiendasSee Page 24
P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<
L898902C<3UTO6908061F9406236ZE184226B<<<<<14 Notable differences between the example data and an actual US passport:
The Place of Birth (if in the United States) will be in the form &#34;State, U.S.A.&#34;The Authority will specify the city of the passport office (New Orleans is one possibilityPassport numbers are 9 digits with no letters.There is no personal number.Type, Code, and Passport No. are on the same line. Sex and Place of birth are on the same line. Date of issue and Authority are on the same line. (I haven&#39;t figured out how to format it correctly without some tortorous HTML.)
So here is the example MRZ.
P<UTOERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<
L898902C<3UTO6908061F9406236ZE184226B<<<<<14
Here are the fields:
Ptiiinnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn
#########CbbbYYMMDDCsyymmddCppppppppppppppCXGeneral NotesAll fields are padded with less than signs (<) to fill the required width. There should be no whitespace in the MRZ. Only letters A through Z, digits 0 through 9, and the filler character < are allowed. Some extended letters are mapped to other sets of characters per the following table. The alternate encoding is used when the normal encoding might caused confusion between different names.
CharacterEncodingAlternate
EncodingÄAEÅAAÆAEIJIJIJIJÑNNXXÖOEØOEÜUEUXXßSSP - PassportThe first letter is &#34;P&#34;, designating a passport.
t - Passport TypeThe second character can be assigned by the issuing country to distinguish different types of passports. If unused a < is assigned.
The United States, at least in the cases I&#39;ve seen, doesn&#39;t use this field.
In the example above there is a <, apparently the fictional country of Utopia doesn&#39;t specify specific types, or Anna doesn&#39;t need one.
iii - Issuing Country or OrganizationThe issuing country or organization, encoded in three characters. The code is pulled from this table.
In the example above the code is UTO. This code doesn&#39;t exist; it&#39;s the fictional country of Utopia for the example.
nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn - NameThis field is the passport holder&#39;s name. The general format is &#34;LAST<NAME<<FIRST<NAME<ADDITIONAL<NAMES<<<<<&#34;. The name is entirely upper case. Puncuation (like hyphens) are replaced with the filler character < The surname is given first, then the filler character twice (<<), then the remainder of given names. Separate names in the surname or given name are separated with the filler character < The filler character < pads out the field to fill 39 characters.
Suffixes (Jr, Sr, II, III, etc) are encoded as part of the last name, without punctuation.
If the name is too long to fit the most significant parts of the name are used. Names may abbreviated if necessary to make them fit.
In the above example Anna&#39;s surname is Eriksson, her first and middle names are Anna and Maria. Her name is encoded as
ERIKSSON<<ANNA<MARIA<<<<<<<<<<<<<<<<<<<George Michael Richards-Stevens Jr. would be encoded as
RICHARDS<STEVENS<JR<<GEORGE<MICHAEL<<<<######### - Passport NumberThis is the passport number, as assigned by the issuing country. Each country is free to assign numbers using any system it likes. If the number has non-letter or number characters they are replaced with the filler character <.
C - Check digitCheck digits are calculated based on the previous field. Thus, the first check digit is based on the passport number, the next is based on the date of birth, the next on the expiration date, and the next on the personal number. The check digit is calculated using this algorithm.
bbb - NationalityThe issuing country or organization, encoded in three characters. The code is pulled from this table.
In the example above the code is UTO. This code doesn&#39;t exist; it&#39;s the fictional country of Utopia for the example.
YYMMDD - Date of BirthThe date of the passport holder&#39;s birth in YYMMDD form. Year is truncated to the least significant two digits. Single digit months or days are prepended with 0.
In the example Anna was born in August 6th, 1969. That encodes as &#34;690806&#34;.
s - SexSex of the passport holder, M for males, F for females, and < for non-specified.
Anna is female, so &#34;F&#34;.
yymmdd - Passport Expiration DateThe date the passport expires in YYMMDD form. Year is truncated to the least significant two digits. Single digit months or days are prepended with 0.
Anna&#39;s passport expired on June 23rd, 1994 and is encoded &#34;940623&#34;.
pppppppppppppp - Personal NumberThis field can be used for any purpose that the issuing country desires.
The United States uses this field in some unknown way. My personal passport has a single digit number in the field.
Anna&#39;s personal number is ZE184226B, this field is encoded &#34;ZE184226B<<<<<&#34;.
X - Final check digitThis is a check digit for positions 1 to 10, 14 to 20, and 22 to 43 on the second line. Thus, the nationality and sex are not included in the check. The check digit is calculated using this algorithm.
Check Digit CalculationsFirst, break the input into individual characteres and numbers.
Next, convert non-digits into numbers. A through Z are encoded to 10 through 25. The filler character < is encoded as 0.
<ABCDEFGHIJKLMNOPQRSTUVWXYZ01011121314151617181920212223242526272829303132333435Now, multiply each number by the corresponding weighting. The first digit is multipled by 7, the next by 3, and the next by 1. The pattern then repeats (7, 3, 1, 7, 3, 1, 7, 3, 1, etc).
Add up the results, then divide by 10. The remainder is the check digit.
As a special case, if the personal number on the second line is not used (and thus entirely filled with the filler character <), the check digit for that section can be replaced with the filler character <.
An example for the input AB2134:
Input:A B 2 1 3 4 < < <Value:10 11 2 1 3 4 0 0 0Weight:7 3 1 7 3 1 7 3 1Products:70 33 2 7 9 4 0 0 0Sum:70+33+2+7+9+4+0+0+0=125Division: 125 ÷ 10 = 12, remainder 5
Country / Organization / Special Table(略了吧) |