Real Programmers/ Project/ Barcode
Google site:

realprogrammers.com

Barcodes

This is the start of an investigation into scanning barcodes and creating online databases of information in the manner of FreeDB (free, open clone of CDDB) where people independently submit information.

Here is a simple perl program to read the serial port and convert an EAN (the 13-digit barcode on the back of most books) into an Amazon URL: reader.pl. It features: configuring the serial port for use with a serial scanner, conversion of EANs into ISBNs, and how to write to the X clipboard.

Quick Intro to Barcodes

These days pretty much every retail product has a barcode on it, usually at the back bottom right. There are essentially two types of barcode commonly seen, the 13-digit EAN (European Article Number) and 12-digit UPC (Universal Product Code). Despite their names, pretty much the entire world uses EANs, except the United States and Canada who continue to use UPC. North America does use EANs for books however in large retail outlets. EANs can be converted to International Standard Book Number (ISBN) straightforwardly which most people are more familiar with, and almost anywhere that deals with books can search on ISBN directly.

Future of barcodes

The 12 digits of the UPC system can only represent so many different companies and their products. It's estimated by the UCC that this number space will be exhausted by 2005. Additionally, the use of two systems, the EAN and UPC, has some interoperability headaches. To this end a new 14 digit system is being phased in: the Global Trade Item Number (GTIN). There is a deadline for compliance with GTIN of January 1, 2005 referred to as the Sunrise Date.

Resources

http://www.barcode-us.com/support_desk/booksuppcontent.htm
http://www.gnu.org/software/barcode/barcode.html
http://search.cpan.org/search?dist=Business-ISBN
http://www.bizfonts.com/sourcecode/
http://www.idautomation.com/code39faq.html
http://www.bizfonts.com/upc-ean/faq.htm
http://www.ean.be/
http://www.uc-council.org/
http://www.bic.org.uk/barcodes.html
http://www.cognizant.com/wpapers/_onreg/pdf/retail_upc_ean.pdf

All non-user content and code Copyright © 2000-2006 realprogrammers.com / Paul Makepeace. Comments & feedback welcome!