Z-Geek Rant on Universal Product Codes
- Begin: 1998-04-26, 2254
- Participants: amu, eichin, map, jdaniel, rdl
hmm, it's only $350 to get registered in the UPC code space...
What are you planning to put bar codes on? :-)
actually, I was looking for info on reading them, to
see if I could find a shortcut for entering books in my library...
unfortunately it looks like they only assign the 6
digit company codes, they don't register content at all... so there's
no uniform way to look them up...
didn't this come up w.r.t. sipb books a few days ago?
dunno, I didn't see it; I've been considering this for
my library for a while (it's only about 300 sci-fi paperbacks, that
doesn't include any of the text books or references, but if I'm ever
going to index them I should start soon)
There is an IETF WG working on that... :-) Of course, once it's standardized,
then the companies have to actually put the info online for you to reference...
interesting. It's not a problem space where anyone
would actually listen to the ietf, though, is it?
have you tried asking a bookstore?
Actually, I think there are a few publishers in the WG... It's actually only
one of the many categories that the URN WG is looking at...
I can tell, now that the UPC part of the bar code
literally has the publisher name and the price, and that's
it... there's an extension field which has the last 6 digits of the
isbn (at least in this particular book) but more importantly,
wordsworth labels everything with stickers and their *own* bar codes.
I may end up ocr'ing the ISBN ;-)
sure, isbn has been a grandfathered category for urns for a
long time... but like the rest of the urn mess, there's nothing behind
it. (I just figure if I can get the isbn I can cheat and write a
robot to grovel the LoC and amazon :-)
UPC was in the URN list of code spaces, too. At least it was at one point, I'm
not suree anymore. They wander all over the possible solution space...
"Rack size" mass market paperbacks are coded by price-point; that is,
the second five digits of the U.P.C. Symbol are assigned by price
(i.e., all books selling for $1.25 carry the same item number). This
there are 2 different bar codes on such books...one that
starts with a 9, that's got the price in it somewhere...anf
the other one that starts with a 0 that is just the ISBN
no, actually, none of them start with a 9 (9 is
reserved, they'd be 0 or 5, and this particular one uses 0...)
this particular book (blue limbo, publisher TOR) has a
UPC code of 0-37145-00599-7; 7 is the check digit, 0-37145 is
(presumably) tor, 00599 is the list price code ($5.99) There is an
extension field (still barcode but not upc) of 57134 which happens to
be part of the ISBN (0-812-57134-7). Then there's the wordsworth
stick-on label with another barcode altogether.
it sounds like OCRing the isbn is the best choice.
a random o'reilly book has 9-781565-921498, but that's
not UPC -- that's "Bookland EAN", where the 9-78 is the "country code"
for a fictitious country called bookland :-)
just to verify, 0-37145-00599-7:
(* 3 (+ 0 7 4 0 5 9))75
(+ 3 1 5 0 9)18
(+ 18 75)93 (- 10 3) 7, which is the check digit.
for this oreilly book, the code is acutally
which breaks into
978 - bookland country code (could be 979 which is currently unused)
1-56592-149 - the actual isbn
8 - the EAN check digit (different than the isbn check digit which
would be 6 here)
90000 - "no suggested retail price".
there's a large 9 in plaintext at the beginning of the
no, that 9 is part of the bar code.
ie. the distinction you suggested (the 9 indicating the
price is present) is both inconsistent with the specs I can find and
with the sample books I have looked at :-)
[the particular o'reilly book I'm reading is
Hmm, I have a bunch of books with 9-78... codes.
I would hope so - 9-78 is the international book industry
EAN code prefix. It's just mass-market paperbacks that use UPC.
(none of which encode the prices in any obvious fashion,
whereas books with 0-... codes do)
ean check digit:
(* 3 (+ 9 8 5 5 2 4))99
(+ 7 1 6 9 1 9)33
(+ 99 33)132 (- 10 2) 8 which works.
not even all of *those*, apparently; I have a dave barry
paperback with a 9-78 code.
so I *could* use the barcode as a first shot: check for
a 978, and discard (or only fill in the publisher - maybe cross match
upc publishers with isbn publishers) if I get something else...
(That's not in the standard paperback form factor, though.)
oops, I got it backwards...flaky memory...
that may be why then.
of course, most of my data are in KC. :-)
"normal" UPC codes begin with 0 or 7; coupons with 5;
drugs with 3; random-weight items 2; 4 is for in-store use, and the
rest (including, in particular, 9) are reserved.
odd the barcode's checksum digit is computed differently
from the ISBN one
ean and upc seem to use the same algorithm (but
different numbers of digits.) Note that the ean alg is running on the
whole string including the bookland country code, not just the digits
of the isbn...
ah, that makes sense.....
hmm, what's 9-87?
dunno, what are you seeing it on?
could just be an error :-)
(9-870817-638663; ISBN 0-8176-3866-0. Could be. :-))
(+ (* 3 (+ 9 7 8 7 3 6 ))
8 0 1 6 8 6)149 (- 10 9)1
I should check it again but it looks to me like the check sum is wrong
see if you can visually compare the stripes with one
that says 9-78...
there is a very early stripe distance.
is there DOS software to do this?
I'm looking; there's certainly lots of stuff to *print*
I don't know how the checksum is calculated...but your
printed equation is confusing me
there's a company out on the cape that does a lot of bar
code stuff. I wonder if they'd know.
(most of their software engineers are APO people taking a
term or two off)
oh, it's simple: take the first, third, ... digits, sum
and multiply by 3, take the second, fourth, ... sum, sum the two sums,
then subtract from 10.
the normal upc codes are apparently managed by the
distributors, not by any central database.
hmm, so they probably typoed in the string that was
converted to the bar code and the printed digits.
ah, there should have been `=' occasionally in your
equations...maybe the formatting I removed would have made
it more clear...
(+ (* 3 (+ 9 7 8 7 3 6))
8 0 1 6 8 6)149 (- 10 9)1
(+ (* 3 (+ 9 8 8 7 3 6))
7 0 1 6 8 6)151 (- 10 1)9
hmm, swapping doesn't help either.
oh, you're right. hrm. jdaniel: looks like elisp
yeah, those are just prefix s-expressions...
ah....I hadn't put my mind in the right mode to read it....
ah, and 977 is for issn's...
appears to be (or have been, I can't reach it right now) a upc vendor
code database, built up by web contributions to over 25,000 entries :-)
I can report from experience that maintaining such a list is not burdensome...
ahhhh. I forgot about the ones inside. mass market
paperbacks have the UPC on the back, but inside the front cover, have
the EAN. So 0-37145-00599-7//57134> has inside 9-780812-571349-50599>
where the 50599 indicates US$ 5.99 (and the rest is Bookland EAN with
so it looks like EAN scanning will be enough for me.
what are you going to use to do the physical scanning?
dunno yet. I have an old HP-41 wand :-) but rather
than do the interface conversion, I'm thinking of having my brother
scavenge for me... it's the kind of thing his company probably builds
any chance you could use it to do the SIPB books, or let
someone borrow it for a couple hours to do so? I was
thinking of putting together a database of SIPB books, and
I'd rather not do all the typing if possible.
if I come up with something portable, sure. (I'm
pretty sure there's software to do it off a flatbed scanner, too, and
sipb has one of those already...)
flatbeds are slow. I'd rather just read the number off to
someone else who types it in if it's going to be anything
other than a handheld wand.
in fact, http://www.adams1.com/pub/russadam/share.html
lists some flat bed software, and someones senior project at caltech
to use a 486 and a joystick port to run a barcode scanner...
heh, symbol makes a wearable barcode scanner - the
small one is worn like a ring on the index finger, just press a
contact with your thumb and it scans whatever you're pointing at :-)