Interleaved 2 of 5

Interleaved 2 of 5 is a 1-D bar code, used for encoding numbers only. A specification of this bar code can be found at BarCode-1.

One can not get a correct bar code for a given message by printing it directly using the Codei25JK font. You can use the enclosed Perl script, or the Visual Basic script CODEI25.VBS, to convert a string into the correct form to be used with the Codei25JK font. If you are not using these scripts, the string to be printed should be generated as follows:

If the optional checksum character is used, compute it according to the specification, and append it to the end of the string. If the number of characters (including the checksum character) is odd, add a leading zero to the string. Divide the string into pairs of digits, and treat each pair as a number (i.e. they will be numbers between 0 and 99). Add 32 to each of these values, and create a string with corresponding character values.

Note that the string generated by this procedure may contain characters that are not printable ASCII characters (they will be in the range 127 to 131). Since characters in this range may be undesirable (e.g. for copy-pasting between windows), there is an alternative representation in the range 192 to 196. So, for numbers between 95 and 99: add 97, instead of 32, to get the character value. The characters in the range 192 to 196 for the ISO8859-1 encoding are À, Á, Â, Ã, Ä respectively.

Finally add the start character (decimal 197: Å in ISO8859-1) to the beginning, and the stop character (decimal 198: Æ in ISO8859-1) to the end of the string; this will now be the string to be printed with the Codei25JK font.

Check the BarFonts home page regarding the hazards of smart quotes in certain word processors.

[BarFonts home page]