Code 93

Code 93 is a continuous symbology and is much more compact than Code 39 to which it is closely related.

The standard Code 93 symbology supports upper case letters, numbers and the following additional characters; SPACE, HYPHEN/MINUS (-), POINT(.), PLUS(+), DIVIDE(/), DOLLAR($) and PERCENT(%). No other characters are allowed!

The Extended Code 93 symbology supports the full ASCII character set - although it does this at a price by using two barcode characters to represent each code character (the a is represented in the barcode by a special character followed by A).

Code 93 symbols are generally contain two check digits calculated using a modulo 47 algorithm, using the value of each character as follows:

 

character

value

0 - 9

0-9

A-Z

10 - 35

-

36

.

37

(space)

38

$

39

/

40

+

41

%

42

shift 1  Chr$(168) ¨

43

shift 2  Chr$(169) ©

44

shift 3  Chr$(170) ª

45

shift 4  Chr$(171) «

46

 

The check digits are calculated by summing the weighted character values to give sums t1 and t2,

             j = ((n - i ) Mod 20) + 1   ' check digits weighted sums into t1 and t2
             t1 = t1 + j * chn
             j = ((n - i + 1) Mod 15) + 1
             t2 = t2 + j * chn

where n is the number of characters in the string (not including the check digits),  i is the position in the string (starting at 1 on the left), and chn is the value of the ith character taken from the table above.

Once the sums have been calculated the modulo 47 remainders are the values of the two check digits, the character for which are given in the table above

        t1 = (t1 Mod 47)                ' modulo 47 checksum

        t2 = ((t2 + t1) Mod 47)

The two check digit characters must be appended to the code, which becomes

§code(t1)(t2)¬

This code must begin with a start character and must end with a stop character. The start character is § (Chr$(167)) and the stop character is ¬ (Chr$(172)).

The dFont program provided with the dLSoft Barcode fonts calculates check digits and for both Code 93 and Extended Code 93, and the source code is provided and may be adapted to the users needs - for example, for automating the calculation in a spreadsheet or database.

Because the space character does not print from some Windows applications the space character is reproduced at ASCII 159 and 160.

For convenience of handling characters with ASCII values of less than 32 are reproduced in the font at the character positions chr$(192) - chr$(223), and ASCII 127 is reproduced at ASCII 191.

 

More:

EAN and UPC