back

by evolve2k·1y ago·view on hn ↗
Ha this took me down a rabbit hole. I once did food packaging design and we had to sort out correct labelling including the barcode so I had vague memories of the barcode system.

If I’m not mistaken, food packaging is generally labelled worldwide with the same primary bar code type, which specifically is the GS1 standard. Maybe in your head “a normal product barcode”.

More here:

https://www.gs1.org

Seems the country of origin, is encoded into the barcode spec using a 3 digit ISO country code format.

I’ve not yet worked out which digits..

But practically once worked out it should be easily determined with a knowing read of the code in numbers (look for the number X which is Y digits in) sort of thing.

Or equally fairly trivial to make a scanner app that reports the country of origin or visually responds to certain counties of origin.

Deeper spec here:

https://ref.gs1.org/standards/genspecs/

I found country of origin stuff on page 178, but doing this on my phone haven’t yet worked out .. how many digits across the county of origin code is stored.

Section titled “3.7.1.5 Country of Origin of a Trade Item”.

1 comments
> Deeper spec here: > https://ref.gs1.org/standards/genspecs/

I fear you're mixing it all up :-)

Most stuff in supermarkets is labelled only with a EAN or UPC code. While EAN codes carry a country code, it's only the country code of the GS1 country branch which dished out the code range to that company, which does not necessarily mean the product is from there, while UPC codes say even nothing at all about countries.

The document you linked to instead is for the full GS1 standard, like it's e.g. often used to track pallets, shipments etc. A GS1 Code 128 code for example can carry all kinds of information, dependent on the Application Identifiers there are in the code - which are explained in the document you linked to. But you will absolutely seldomly see a product tagged with a (long) code like this in a shop. These kind of barcodes get huge soon and are mostly used in shipping or storage.

Basically, to REALLY know where a product is from, you'd need a full UPC/EAN database plus do some tracking what kind of company is behind a certain number range. No such official database exists, there are a few inoffical ones though.

The old adage of posting something wrong on the internet. Cheers! It was a scrambled look around. Appreciate you clarifying that the country code is not in the barcode number. How sweet that would have been.

Yeah seems deeper issue. Best I can think is that groups build up a database of products starting from even an incomplete data set and making it so more can easily be added. Oh well.