c0shea/IdParser

Fail to parse AAMVA

zabralex85 opened this issue · 3 comments

image

BARCODE:

@

AAMVA36004001DL00280200DLDABLAZOFF
DACPATRICIA
DADLOEB
DAE
DAL3105 ADDDR ADDDR DR
DAM
DANRALEIGH
DAONC
DAP27614-7307
DAQ27475304
DARC
DAS1
DATNone
DAV5-01
DAYBRO
DAZBRO
DBA06-05-2019
DBB06-05-1951
DBCF
DBD07-18-2012

System.ArgumentException: "The record separator is invalid. Expected '0x1E'. Received '0x0A'.
Имя параметра: input"

  • "@\n\nAAMVA36004001DL00280191DLDABSWARTZ\nDACSUSAN\nDADPATRICIA\nDAE\nDAL11 KANDES CT\nDAM\nDANDURHAM\nDAONC\nDAP27713-9722\nDAQ32307954\nDARC\nDAS1\nDATNone\nDAV5-06\nDAYHAZ\nDAZBLO\nDBA06-27-2019\nDBB06-27-1951\nDBCF\nDBD06-08-2011\n"

There's two problems with this license. The first is the IIN is wrong. The value is 360040 when it should be 636004 for North Carolina. The second is the required "Number of Entries" field is missing (should come just before the DL). As a result, parsing the offset of the subfile records is off by two bytes. There's not much I can do about this scenario in the code.