Z-Geek Rant on Universal Product Codes
Setting
- Begin: 1998-04-26, 2254
- Participants: amu, eichin, map, jdaniel, rdl
Discussion
- eichin/2254
-
hmm, it's only $350 to get registered in the UPC code space...
- amu/2254
-
What are you planning to put bar codes on? :-)
- eichin/2255
-
actually, I was looking for info on reading them, to
see if I could find a shortcut for entering books in my library...
- eichin/2256
-
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...
- rdl/2256
-
didn't this come up w.r.t. sipb books a few days ago?
- eichin/2258
-
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)
- map/2258
-
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...
- eichin/2259
-
interesting. It's not a problem space where anyone
would actually listen to the ietf, though, is it?
- rdl/2259
-
have you tried asking a bookstore?
- map/2300
-
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...
- eichin/2300
-
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 ;-)
- eichin/2301
-
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 :-)
- map/2303
-
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...
- eichin/2313
-
"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
- jdaniel/2315
-
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
number
- eichin/2317
-
no, actually, none of them start with a 9 (9 is
reserved, they'd be 0 or 5, and this particular one uses 0...)
- eichin/2319
-
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.
- rdl/2320
-
it sounds like OCRing the isbn is the best choice.
- eichin/2320
-
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 :-)
- eichin/2323
-
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.
- eichin/2326
-
for this oreilly book, the code is acutally
9-781565-921498-90000
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".
- jdaniel/2327
-
there's a large 9 in plaintext at the beginning of the
barcode
- eichin/2327
-
no, that 9 is part of the bar code.
- eichin/2328
-
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 :-)
- eichin/2329
-
[the particular o'reilly book I'm reading is
Programming Perl]
- amu/2329
-
Hmm, I have a bunch of books with 9-78... codes.
- eichin/2330
-
I would hope so - 9-78 is the international book industry
EAN code prefix. It's just mass-market paperbacks that use UPC.
- amu/2329
-
(none of which encode the prices in any obvious fashion,
whereas books with 0-... codes do)
- eichin/2330
-
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.
- amu/2330
-
not even all of *those*, apparently; I have a dave barry
paperback with a 9-78 code.
- eichin/2332
-
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...
- amu/2332
-
(That's not in the standard paperback form factor, though.)
- jdaniel/2332
-
oops, I got it backwards...flaky memory...
- eichin/2332
-
that may be why then.
- amu/2332
-
of course, most of my data are in KC. :-)
- eichin/2334
-
"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.
- jdaniel/2334
-
odd the barcode's checksum digit is computed differently
from the ISBN one
- eichin/2335
-
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...
- jdaniel/2335
-
ah, that makes sense.....
- amu/2336
-
hmm, what's 9-87?
- eichin/2337
-
dunno, what are you seeing it on?
- amu/2337
-
Indiscrete Thoughts
- eichin/2338
-
could just be an error :-)
- amu/2338
-
(9-870817-638663; ISBN 0-8176-3866-0. Could be. :-))
- eichin/2341
-
987081763866
(+ (* 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
:-)
- eichin/2342
-
see if you can visually compare the stripes with one
that says 9-78...
- amu/2343
-
there is a very early stripe distance.
- amu/2343
-
er, difference.
- eichin/2343
-
hmmm.
- rdl/2344
-
is there DOS software to do this?
- eichin/2345
-
I'm looking; there's certainly lots of stuff to *print*
the codes...
- jdaniel/2345
-
I don't know how the checksum is calculated...but your
printed equation is confusing me
- rdl/2346
-
there's a company out on the cape that does a lot of bar
code stuff. I wonder if they'd know.
- rdl/2346
-
(most of their software engineers are APO people taking a
term or two off)
- eichin/2346
-
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.
- eichin/2347
-
the normal upc codes are apparently managed by the
distributors, not by any central database.
- amu/2351
-
hmm, so they probably typoed in the string that was
converted to the bar code and the printed digits.
- jdaniel/2353
-
ah, there should have been `=' occasionally in your
equations...maybe the formatting I removed would have made
it more clear...
- eichin/2354
-
987081763866
(+ (* 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.
- amu/2354
-
oh, you're right. hrm. jdaniel: looks like elisp
interaction.
- eichin/2355
-
yeah, those are just prefix s-expressions...
- jdaniel/2357
-
ah....I hadn't put my mind in the right mode to read it....
- eichin/0014
-
ah, and 977 is for issn's...
- eichin/0020
-
hmm, http://garfield.csd.unbsj.ca/upc/upc.html
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 :-)
- map/0022
-
I can report from experience that maintaining such a list is not burdensome...
- eichin/0022
-
yeah :-)
- eichin/0027
-
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
isbn 0-81257134-?
- eichin/0027
-
so it looks like EAN scanning will be enough for me.
- rdl/0027
-
what are you going to use to do the physical scanning?
- eichin/0028
-
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
or repairs...
- rdl/0029
-
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.
- eichin/0030
-
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...)
- rdl/0031
-
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.
- eichin/0033
-
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...
- eichin/0122
-
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 :-)