Universal Code 128 FAQ
Code 128 Universal Font FAQ & Character Set
With all IDAutomation Universal Font licenses, royalty free rights are granted for the Universal Font Encoders (which include macros, plug-ins and source code) for application integration. Reference of the character set is usually not necessary when making use of these encoders.
Code-128 Universal Character Set
The characters used to generate Code 128 barcode symbols with the Universal Font provide compatibility for all countries, code pages and operating systems. Within the Code 128 Universal character set, a combination of three characters (letters A-P represented in the Chars column below) are used to reference a single barcode value. For example, to encode the character “V” in set B, the character combination of “IAG” would be used. When displayed or printed with the Universal Font, “IAG” generates character “V”, which is the Code 128 barcode value of 54. The Online Font Encoder may be used to view data conversion.
Code A | Code B | Code C | Chars | Value |
---|---|---|---|---|
Space | Space | 0 | EFF | 0 |
! | ! | 1 | FEF | 1 |
" | " | 2 | FFE | 2 |
# | # | 3 | BBG | 3 |
$ | $ | 4 | BCF | 4 |
% | % | 5 | CBF | 5 |
& | & | 6 | BFC | 6 |
' | ' | 7 | BGB | 7 |
( | ( | 8 | CFB | 8 |
) | ) | 9 | FBC | 9 |
* | * | 10 | FCB | 10 |
+ | + | 11 | GBB | 11 |
, | , | 12 | AFJ | 12 |
- | - | 13 | BEJ | 13 |
. | . | 14 | BFI | 14 |
/ | / | 15 | AJF | 15 |
0 | 0 | 16 | BIF | 16 |
1 | 1 | 17 | BJE | 17 |
2 | 2 | 18 | FJA | 18 |
3 | 3 | 19 | FAJ | 19 |
4 | 4 | 20 | FBI | 20 |
5 | 5 | 21 | EJB | 21 |
6 | 6 | 22 | FIB | 22 |
7 | 7 | 23 | IEI | 23 |
8 | 8 | 24 | IBF | 24 |
9 | 9 | 25 | JAF | 25 |
: | : | 26 | JBE | 26 |
; | ; | 27 | IFB | 27 |
< | < | 28 | JEB | 28 |
= | = | 29 | JFA | 29 |
> | > | 30 | EEG | 30 |
? | ? | 31 | EGE | 31 |
@ | @ | 32 | GEE | 32 |
A | A | 33 | ACG | 33 |
B | B | 34 | CAG | 34 |
C | C | 35 | CCE | 35 |
D | D | 36 | AGC | 36 |
E | E | 37 | CEC | 37 |
F | F | 38 | CGA | 38 |
G | G | 39 | ECC | 39 |
H | H | 40 | GAC | 40 |
I | I | 41 | GCA | 41 |
J | J | 42 | AEK | 42 |
K | K | 43 | AGI | 43 |
L | L | 44 | CEI | 44 |
M | M | 45 | AIG | 45 |
N | N | 46 | AKE | 46 |
O | O | 47 | CIE | 47 |
P | P | 48 | IIE | 48 |
Q | Q | 49 | ECI | 49 |
R | R | 50 | GAI | 50 |
S | S | 51 | EIC | 51 |
T | T | 52 | EKA | 52 |
U | U | 53 | EII | 53 |
V | V | 54 | IAG | 54 |
W | W | 55 | ICE | 55 |
X | X | 56 | KAE | 56 |
Y | Y | 57 | IEC | 57 |
Z | Z | 58 | IGA | 58 |
[ | [ | 59 | KEA | 59 |
\ | \ | 60 | IMA | 60 |
] | ] | 61 | FDA | 61 |
^ | ^ | 62 | OAA | 62 |
_ | _ | 63 | ABH | 63 |
nul | ` | 64 | ADF | 64 |
soh | a | 65 | BAH | 65 |
stx | b | 66 | BDE | 66 |
etx | c | 67 | DAF | 67 |
eot | d | 68 | DBE | 68 |
eno | e | 69 | AFD | 69 |
ack | f | 70 | AHB | 70 |
bel | g | 71 | BED | 71 |
bs | h | 72 | BHA | 72 |
ht | i | 73 | DEB | 73 |
lf | j | 74 | DFA | 74 |
vt | k | 75 | HBA | 75 |
ff | l | 76 | FAD | 76 |
cr | m | 77 | MIA | 77 |
s0 | n | 78 | HAB | 78 |
s1 | o | 79 | CMA | 79 |
dle | p | 80 | ABN | 80 |
dc1 | q | 81 | BAN | 81 |
dc2 | r | 82 | BBM | 82 |
dc3 | s | 83 | ANB | 83 |
dc4 | t | 84 | BMB | 84 |
nak | u | 85 | BNA | 85 |
syn | v | 86 | MBB | 86 |
etb | w | 87 | NAB | 87 |
can | x | 88 | NBA | 88 |
em | y | 89 | EEM | 89 |
sub | z | 90 | EME | 90 |
esc | { | 91 | MEE | 91 |
fs | | | 92 | AAO | 92 |
gs | } | 93 | ACM | 93 |
rs | ~ | 94 | CAM | 94 |
us | del | 95 | AMC | 95 |
fnc 3 | fnc 3 | 96 | AOA | 96 |
fnc 2 | fnc2 | 97 | MAC | 97 |
Shift | Shift | 98 | MCA | 98 |
code C | code C | 99 | AIM | 99 |
code B | fnc 4 | code B | AMI | 100 |
fnc 4 | code A | code A | IAM | 101 |
fnc 1 | fnc 1 | fnc 1 | MAI | 102 |
Start A | Start A | Start A | EDB | 103 |
Start B | Start B | Start B | EBD | 104 |
Start C | Start C | Start C | EBJ | 105 |
Stop | Stop | Stop | GIAH | na |
VB Source Code Example
The following VB example for Code-128B loads the character set into an array and references the characters being encoded by subtracting 32 from the character ASCII value. A complete set of VB source code is provided in the purchased version that supports all character sets, as well as the encoding of the FNC1 character for generation of GS1-128.
Public Function IDAutomation_Uni_C128b(DataToEncode As String) As String
SetC128 = Array(“EFF”, “FEF”, “FFE”, “BBG”, “BCF”, “CBF”, “BFC”, “BGB”, “CFB”, “FBC”,
“FCB”, “GBB”, “AFJ”, “BEJ”, “BFI”, “AJF”, “BIF”, “BJE”, “FJA”, “FAJ”, “FBI”, “EJB”,
“FIB”, “IEI”, “IBF”, “JAF”, “JBE”, “IFB”, “JEB”, “JFA”, “EEG”, “EGE”, “GEE”, “ACG”,
“CAG”, “CCE”, “AGC”, “CEC”, “CGA”, “ECC”, “GAC”, “GCA”, “AEK”, “AGI”, “CEI”, “AIG”,
“CIE”, “IIE”, “ECI”, “GAI”, “EIC”, “EKA”, “EII”, “IAG”, “ICE”, “KAE”, “AKE”, “IEC”,
“FDA”, “OAA”, “ABH”, “ADF”, “BAH”, “BDE”, “DAF”, “IGA”, “KEA”, “IMA”, “DBE”, “AFD”,
“MIA”, “HAB”, “AHB”, “BED”, “BHA”, “DEB”, “DFA”, “HBA”, “FAD”, “CMA”, “ABN”, “BAN”,
“BBM”, “ANB”, “BMB”, “BNA”, “MBB”, “NAB”, “NBA”, “EEM”, “EME”, “MEE”, “AAO”, “ACM”,
“CAM”, “AMC”, “AOA”, “MAC”, “MCA”, “AIM”, “AMI”, “IAM”, “MAI”, “EDB”, “EBD”, “EBJ”)
WeightedTotal = 104
PrintableString = SetC128(104)
StringLength = Len(DataToEncode)
For I = 1 To StringLength
CurrentCharNum = (AscW(Mid(DataToEncode, I, 1))) – 32
CurrentValue = CurrentCharNum * I
WeightedTotal = WeightedTotal + CurrentValue
PrintableString = PrintableString & SetC128(CurrentCharNum)
Next I
CheckDigitValue = (WeightedTotal Mod 103)
PrintableString = PrintableString & SetC128(CheckDigitValue)
IDAutomation_Uni_C128b = PrintableString & “GIAH”
End Function