3

How can I check weather a Code 128 bar-code is "EAN 128" or not. I am creating an application that uses both Code 128 and EAN 128 bar-code. While scanning a "EAN128" bar code the Android Vision API is returning the type as Code 128. From google I came to know that EAN 128 is a subset of Code 128 barcode. But how I can validate it separately like if it is valid EAN128 bar code or not since the device is not providing bar code sub type information.

Please help

Terry Burton
  • 2,801
  • 1
  • 29
  • 41
Stephan Ronald
  • 1,395
  • 2
  • 14
  • 39
  • Please refer to this page. [GS1-128 Barcodes(formerly UCC / EAN-128)](https://www.gs1-128.info/) – kunif Oct 30 '18 at 02:43
  • When I last looked the API did not provide the standard symbology identifier which precisely differentiates between the subtypes of Code 128. So in essence you can't without resorting to some kind of heuristic, i.e. to determine does the data that a symbol bears parse as a valid EAN-128 (GS1-128) or not? See https://stackoverflow.com/a/39134882/2568535 and the ensuing discussion. – Terry Burton Oct 30 '18 at 21:59
  • 1
    I'll note though that according to the observation from the time the Vision Library had a bug that may work on you favour until/unless it is fixed: The initial FNC1 character in the first data position (precisely what differentiates am GS1-128 from the generic Code 128) is erroneously represented as an initial GS character in the scan data. – Terry Burton Oct 30 '18 at 22:05

0 Answers0