Groups Images Directory Web
Recently Visited Groups | Help | Sign in
Google Groups Home
Group info
Code 128 (A, B & C, including EAN-128)    

 

Overview

Code 128 is a arbitrarily long, very high density symbology that can be used to encode 128 character ASCII.

Invokation

  • Code 128 has three alphabets A, B and C each containing 106 characters.

    • Alphabet A includes the special ASCII characters, e.g. NUL, ACK, etc.
    • Alphabet B includes all general purpose characters
    • Alphabet C is for double density numeric data
  • Non-printable/typable characters can be entered as their escaped ordinal values, e.g. ^102 for FNC 1, etc.
  • If you want to encode ^ in your data you need to be escape it as ^062.
  • The data must begin with a start character ^103, ^104 or ^105 to denote the initial alphabet A, B or C, respectively
  • You can switch the working alphabet within the data using characters ^101, ^100 and ^099 for A, B and C, respectively
  • When using alphabet C you must enter digits in pairs. For an odd number of digits you must switch to alphabet A or B to capture the stray digit
  • The manditory mod 103 check digit is calculated automatically

Example Code 128

0 0 moveto (^104Count^0990123456789^101!) (includetext) code128

EAN-128

An EAN-128 (UCC-128) is encoded using Code 128 and has an start character (^103, ^104 or ^105) immediately followed by an FNC 1 symbol (^102). It then contains a concatinated list of Application Identifier (AI) fields. Except for the fixed-width fields listed in the table below, each variable-width field must be distinguished from the following field using an FNC 1 symbol (^102).

Example EAN-128

To represent the data: (01) 05015612003078 (15) 080826 (21) 84736154 (10) 916

0 0 moveto (^105^1020105015612003078150808262184736154^1021091^1006) (includetext) code128 barcode

Note the switch to alphabet B (^106) in order to encode the final unpaired digit 6.
Note also the interfield FNC 1 (^102) to delimit the end of the variable-width AI (21) field.

Code 128 Character Table

Value Code A Code B Code C
----- ------ ------ ------
0 SP SP 00
1 ! ! 01
2 " " 02
3 # # 03
4 $ $ 04
5 % % 05
6 & & 06
7 ' ' 07
8 ( ( 08
9 ) ) 09
10 * * 10
11 + + 11
12 , , 12
13 - - 13
14 . . 14
15 / / 15
16 0 0 16
17 1 1 17
18 2 2 18
19 3 3 19
20 4 4 20
21 5 5 21
22 6 6 22
23 7 7 23
24 8 8 24
25 9 9 25
26 : : 26
27 ; ; 27
28 < < 28
29 = = 29
30 > > 30
31 ? ? 31
32 @ @ 32
33 A A 33
34 B B 34
35 C C 35
36 D D 36
37 E E 37
38 F F 38
39 G G 39
40 H H 40
41 I I 41
42 J J 42
43 K K 43
44 L L 44
45 M M 45
46 N N 46
47 O O 47
48 P P 48
49 Q Q 49
50 R R 50
51 S S 51
52 T T 52
53 U U 53
54 V V 54
55 W W 55
56 X X 56
57 Y Y 57
58 Z Z 58
59 [ [ 59
60 \ \ 60
61 ] ] 61
62 ^ ^ 62
63 _ _ 63
64 NUL ' 64
65 SOH a 65
66 STX b 66
67 ETX c 67
68 EOT d 68
69 ENQ e 69
70 ACK f 70
71 BEL g 71
72 BS h 72
73 HT i 73
74 LF j 74
75 VT k 75
76 FF l 76
77 CR m 77
78 SO n 78
79 SI o 79
80 DLE p 80
81 DC1 q 81
82 DC2 r 82
83 DC3 s 83
84 DC4 t 84
85 NAK u 85
86 SYN v 86
87 ETB w 87
88 CAN x 88
89 EM y 89
90 SUB z 90
91 ESC { 91
92 FS | 92
93 GS } 93
94 RS ~ 94
95 US DEL 95

96 FNC 3 FNC 3 96
97 FNC 2 FNC 2 97
98 SHIFT SHIFT 98
99 CODE C CODE C 99
100 CODE B FNC 4 CODE B
101 FNC 4 CODE A CODE A
102 FNC 1 FNC 1 FNC 1

103 START (Code A)
104 START (Code B)
105 START (Code C)

Fixed Width EAN-128 Application Identifiers

This table of all fixed field width Application Identifiers shows the two-digit AI prefixes alongside the number of remaining digits to the end of their field.

AI Prefix Remainder
--------- ---------
00 18
01 14
02 14
03 14
04 16
11 6
12 6
13 6
14 6
15 6
16 6
17 6
18 6
19 6
20 2
31 8
32 8
33 8
34 8
35 8
36 8
41 14
Version: 
Latest 3 messages about this page (4 total) - view full discussion
18 Sep 2007 by Terry Burton
In terms of the human readable text beneath the barcode, this does not
display the parentheses by design and there is no way to make it do so
without writing a little extra PostScript to place after the
invocation.
The following previous posts should help you with this:
http://groups.google.co.uk/group/postscriptbarcode/browse_thread/thread/bc6580493c146678/f66b8ca83053899c?lnk=gst&q=human+readable&rnum=1#f66b8ca83053899c
18 Sep 2007 by PATHOLO
I actually was just wondering how to put parenthesis around the 01. Is
there a certain code that I am missing. Or do I need to use a
different barcode?
18 Sep 2007 by Terry Burton
I'm not certain about exactly what it is that needs to be encoded from
the given description.
In EAN/UCC-128 the numbers in brackets always refer to Application
Identified as described in the EAN-128 section of
http://groups.google.co.uk/group/postscriptbarcode/web/Code%20128%20%28A%2C%20B%20%26%20C%2C%20including%20EAN-128%29
1 more message »
Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google