micjahn/ZXing.Net

UPC_A's error message is wrong.

dai-kanai opened this issue · 0 comments

ZXing.Windows.Compatibility.BarcodeWriter.Write throws an ArgumentException if the format is UPC_A and if the parameter 'contents' is "1234567890" for example.
The property 'Message' of the exception is "Requested contents should be 12 (without checksum digit) or 13 digits long, but got 11".
It should be "Requested contents should be 11 (without checksum digit) or 12 digits long, but got 10".

  • The first two fixed numbers are wrong.
  • The length of 'contents' is always wrongly added with one in the message.

Only the message is wrong.
Actually, It correctly generate a barcode for an 11 (12 including the check digit) digits number.