captainspi
captainspi

Reputation: 445

Decoded barcode extra digits

I am trying to come to terms with how a barcode is decoded and generated by a scanner.

A note from the client says the following generated bar code consists of extra characters:

Generated Code: |2389299920014} Extra Characters: Apparently the first two and last three characters are not part of the bar code.

Question Are the extra characters attached by the bar code reader (therefore dependent on the scanner) or are they an intrinsic part of the barcode?

Here is a sample image of a barcode: http://imageshack.us/a/img824/1862/dm6x.jpg

Thanks

[SOLVED] My apologies. This was just another one of those cases of 'shooting your mouth off' without doing proper research.

Solution The code is EAN13. The prefix and suffix are probably scanner dependent. The 13 digits in between are as follows (first digit from the left) Check Sum (Next 9 digits) Company Id + Item Id (Last 3 Digits ) GS1 prefix

Upvotes: 0

Views: 2108

Answers (1)

Sean Owen
Sean Owen

Reputation: 66876

It's hard to answer without understanding what format you are trying to encode, what the intended contents are, and what the purported contents are.

Some formats add extra information as part of the encoding process, but it does not become part of the content. When correctly encoded and decoded, the output should match the input exactly.

Barcodes encode what they encode and there is no data that is somehow part of the barcode but not somehow encoded in it.

EAN-13 has no scanner-dependent considerations, no. The encoding and decoding of a given number is the same everywhere. EAN-13 encodes 13 digits, so I am not sure what the 13 digits "in between" mean.

You mention GS1, which is something else. A family of barcodes in fact. You'd have to say what specifically you are using. The GS1 encodings are likewise not ambiguous or scanner-dependent. You know what you want to encode, you encode it exactly, it's read exactly.

Upvotes: 1

Related Questions