The stated goal of GS1 (formerly the UPC Code Council) is to “develop and maintains global standards for business communication”. Their most widely know standard is for barcode labels. Here’s a sample GS1 barcode:
A scanner reading this barcode will output “[C101189010720001501719083110LM123”. The symbology above is Code 128 which has 106 different symbol patterns in it’s character set, three different start characters, three subsets (A,B, and C), and four function characters (FNC1 to FNC4) that are not printable that are used for special functions.
All GS1 barcodes start with a Start C symbol followed by a Function 1 character; scanners are supposed to interpret this a “[C1”, which indicates to the receiving software that the code follows GS1 rules.
The three pairs of characters enclosed in parenthesis are Application Identifiers; they tell the receiving software what type of data follows. Note that the parentheses are in the human readable only, they are not in the bar code itself.
A full list of AIs can be found here, but in the above example:
01 – Identifies the following data as a GTIN (Global Trade Identification Number)
17 – indicates an expiration date (YYMMDD)
10 – is a lot number, which is variable length field.
Note that if a variable length field (or more precisely, if the FNC1 is required by the GS1 tables) is in front of another field, a separator character must be used to signal the end of the field. This character can be a FNC1 or and ASCII group separator character (Hex 1D).
GS1 barcodes can also be Datamatrix codes; they follow the same rules as Code 128 except that the first three characters output are “[d2” instead of the “[C1” for Code 128.