Interleaved 2-of-5 (I 2/5) is a high-density continuous symbology that encodes numeric digit pairs only. As this covers the sequence 00 - 99, clearly all digits pairs must be translated into single characters for this symbology to be represented by a font.
It should be noted that I 2/5 symbols require an even number of digits. The convention is that if an odd number of digits is to be encoded a LEADING 0 is attached to the code. This will of course decode when the symbol is subsequently scanned.
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)).
For convenience in typing the open curly bracket { may be used as the start character, and the close curly bracket } may be used as the stop character.
Digit pairs are represented in the dLSoft fonts by characters with an ASCII value corresponding to value of the digit pair. Thus the digit pair 65 is represented by A, because this has an ASCII value of 65.
ASCII values below 32 are not represented by readable characters and so for convenience of handling characters with ASCII values in the range 0 - 32 are reproduced in the font at the character positions chr$(192) - chr$(223). ASCII 32 is reproduced at ASCII 159 and 160.
I 2/5 is often used with a Modulo 10 check digit in the final position.
The dFont program provided with the dLSoft Barcode fonts calculates the check digit for I 2/5 codes, 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.
Unfortunately I 2/5 suffer from the fact that a partial scan is likely to decode as a valid (although shorter) code, and the presence of a check digit does little to overcome this. However, some scanners may be set to accept a fixed number of digits and record an error if less than that number decode.
Interleaved 2-of-5 is the same encoding scheme and bar pattern as the ITF and ITF-6 outer case markers used in distribution, although the latter codes are normally printed with large bearer bars (although this is to spread the pressure during printing and has no effect on the scanning).
More: