Barcode could be UPC or EAN but definitely not a number

Musicbrainz contain “Barcode” (picard use it as tag) no matter whether it is UPC (12 digit) or EAN (13 digit).

In addition, the name “Barcode” in its actual form is not a number.

The existing “Barcodes” had to be sorted by length and then renamed EAN and UPC.

I would be pleased to receive suggestions and opinions.

1 Like

In principle, barcodes are the printed black and white bars, which can be read by a barcode reader and displayed as a 13-digit string or a 12-digit string in case the first number would otherwise be 0 - thus it can have leading zeros, which would be gone when stored as a number.

On the other hand, barcodes were always used to store/refer to product numbers and a leading 0 makes no different product anyway.

Digital media have no bars but may have any number of leading zeros displayed in addition to the actual number.

Maybe we would be happy with a number, displayed with at least 12 digits, but we would lose the difference between UPC and EAN (printed human-readable barcodes, the bars are the same) and “digital barcodes” …although I’m not sure if this data is well maintained. :grin:

3 Likes

I am not sure this helps.

From AI: “A barcode contains a number, specifically a unique string of digits that represents a product. These numbers are used to identify the product in a database and retrieve information about it.”

In my own database I store it as a text string because a leading zero would be striped off and you would have no idea if it was UPC or EAN. When I import to a spreadsheet I have to take care that it imports as text which is a real pain. I call it a number with leading zeros intact.

In the DB there are some number of UPC’s entered as EAN’s, which I fix when I find them, so be careful where the data comes from. Almost all UPC’s in eBay are entered a EAN with a leading zero.

As to sorting it may depend on the application doing the sort. I will need to test sorting a text string of numbers as text and number.

1 Like

A lot of label sites also use the identifier UPC with a leading zero which makes it EAN, but there’s also 13-digit barcodes with a first digit >0.

Imo the barcode in MB should be filled with the result of a scan whenever possible, maybe from release in hand or available cover art that really belongs to the questionable release.

Imo the difference is more complex, please see wiki link below.

Whoever wants to dive deeper here you can get the info: Universal Product Code - Wikipedia

Regarding machine-readable barcode, there is no difference.
UPC and EAN-13 consist of 12 coded 7-segment digits, both have (the same) even parity digits (even number of black segments) on the right side. UPC requires all six digits on the left to be coded with odd parity. EAN determines the first number by the pattern of odd and even parity digits on the left. If all digits on the left are coded with odd parity, the first number is zero and most scanners will omit the first 0 and display a 12-digit UPC - the code is exactly the same.

But the human-readable code may have printed a leading zero, or it may not. Thus it can be distinguished.

4 Likes

Thanks, fully agreed. But there are releases like this https://www.discogs.com/release/36541150-Bugge-Wesseltoft-New-Conceptions-Of-Jazz-Box (my submission from release in hand, will be added to MB soon) having

  • Barcode (Text): 0602517880214
  • Barcode (Scanned, UPC A): 602517880221

They differ not only by a leading zero (text identical to release cat#). So which one should go to the barcode tag on MB? I’d clearly prefer the scanned code.

btw:

This zero is not omitted by the scanner it just is not coded, as I learned from the wiki.

Actually this is not entirely correct please look at the art work on the spine of the box set. All are EAN (13 digits) not UPC (12 digits) as I would expect from most European releases.

Box: 0602517880214
CD1: 0602517880238
CD2: 0602517880245
CD3: 0602517880252
DVD: 0602517880221

bc1 printed on box spine

Edit: It appears the spine numbers are probably catalog numbers and the only “barcode” is 0602517880214 , both printed and scanned

bc3 Box barcode (EAN)

Interesting! It looks like the wrong machine-readable barcode was printed on the back. The guidelines say that the machine-readable should be preferred if the human-readable code is incorrect.
In this case, the human-readable code is not entirely incorrect, but different from the scanned code, so I would enter the machine-readable code and write an annotation to explain things.
Other releases of the box set had the presumably intended barcode printed on them, so it is also a distinguishing feature. https://www.discogs.com/release/11477647

I can’t reproduce that. My scanner reads 602517880221. https://www.discogs.com/release/36541150-Bugge-Wesseltoft-New-Conceptions-Of-Jazz-Box/image/SW1hZ2U6MTM4NzI4MjMz

You are correct, I was wrong on the scan. I had to regenerate both EAN and UPC-A for the numbers. While EAN will the printed 13 digit text number with the leading zero, the generators do not add the leading zero art to the barcode and as such would not scan a leading zero. I need to look at the specs. In any case the printed text below the barcode does not match and corresponds to the catalog number for the DVD.

The art work on amazon does show the correct barcode and printed text/

1 Like

The release mentioned above does also have the correct barcode printed on it (the code on the back image on Discogs can be scanned!). The error was probably fixed quickly, but the already manufactured boxes weren’t thrown away because of that.

For MB, these are definitely different releases. :slight_smile:

2 Likes

The zero is coded in the machine-readable barcode. The fact that all six digits on the left side have odd parity digits makes the first number 0. The first number is only determined by the pattern of L (odd parity) and G (even parity) digit-codes. See Wkipedia: Encoding of the digits

2 Likes

… and never appears in the barcode graphics (no matter if 0 or >0), if I finally got it thanks to your wiki link.

So you were right with scanners omitting to display the leading 0.

Obviously we have 3 different combinations of barcode graphics and ‘numbers printed below’. The ‘Norway’ release (with artwork from amazon) https://musicbrainz.org/release/3c99f0f9-d26c-4bdb-b990-99bbcd9ec578 and 2 European releases with equal ‘numbers printed below’ but different barcode graphics, one of the graphics identical to the ‘Norway’ release. As I have this ‘mixed’ release in hand it soon will be in MB.

1 Like

Yes, 3 releases … also on Discogs, because the difference is visible, although you have to look very closely and also know what you are looking for.

We already have the Norwegian (original) release with different cat# and the corresponding barcode. In fact, this is one of the cases where barcode and cat# are the same.
This is not true for one of the European releases - at least if we use the machine-readable barcode.

Strictly speaking, your release is a misprint, although nobody will call it that - not because of the barcode. :slight_smile:

1 Like

This seems quite common by now. I have a lot releases in my collection with those cat#s, often with leading zero and/or omitting the check digit.

1 Like

It was a bit more work than expected but finally it is in MB: https://musicbrainz.org/release/f65c99f3-85fe-4130-ba1b-f3ae4084d551

1 Like