最后一位是校验位
EAN-13 Specification
Introduction
EAN is designed by the International Article Numbering Association (EAN) in Europe. It is an extension to UPC-A to include the country information. The only difference between UPC-A and EAN-13 is that the number system in UPC-A is a single digit from 0 through 9 whereas an EAN-13 number system consists of two digits ranging form 00 to 99.
EAN-13 encodes 12 digits of numeric data along with a trailing check digit, for a total of 13 digits of barcode data.
Structure of an EAN number
An EAN-13 number consists of four areas: (1) The number System; (2)The manufacturer code; (3) the product code; (4)The check digit. Normally the number system digit is printed to the left of the barcode, and the check digit to the right. The manufacturer and product codes are printed just below the barcode, separated by the guard bar.
Number System. The number system is the first two digits in the EAN number to identify the country/region numbering authority. The number system list is maintained by EAN organization (http://www.ean-int.org).
Manufacturer Code. The manufacturer code is a unique code assigned to each manufacturer by the numbering authority indicated by the number system code. All products produced by a given company will use the same manufacturer code.
EAN uses what is called "variable-length manufacturer codes." Assigning fixed-length 5-digit manufacturer codes, as the UCC has done until recently, means that each manufacturer can have up to 99,999 product codes--and many manufacturers don't have that many products, which means hundreds or even thousands of potential product codes are being wasted on manufacturers that only have a few products. Thus if a potential manufacturer knows that it is only going to produce a few products, EAN may issue it a longer manufacturer code, leaving less space for the product code. This results in more efficient use of the available manufacturer and product codes. Product Code: The product code is a unique code assigned by the manufacturer.
Product Code. The product code is assigned by the manufacturer. The product code immediately follows manufacturer code. The total length of manufacturer code plus product code must be exact 10 digits.
Check Digit: The check digit is used to verify that the barcode is generated or scanned correctly. The check digit is calculated based on the rest of the barcode digits.
The nominal X dimension is 13 mils. The printable X dimension ranges from 10.4 to 24 mils.