I have the following ZPL code
^FO25,215^A0,N,25,25^BCN,100,N,N,N,U^FN21^FS
The customer wants this barcode as a UCC 128 barcode, but their data is alphanumeric.
I looked through the ZPL docs which mentions:
U
for the mode defaults to Subset C which automatically strips out the alpha characters.>9
or >7
to make this Subset A which allows alphanumerics.I tried:
^FO25,215^A0,N,25,25^BCN,100,N,N,N,U^FN>721^FS
But it still removes the letters from the barcode.
Not only that, but it adds 7
as well.
There is nothing that precludes using alphanumeric with UCC-128 (aka GS1-128).
What you must do for a code128 barcode to be GS1-128 compliant is to format the data correctly.
That means the barcode data must be formatted as:
<fnc1> <app-id> <value>
Where:
<FNC1>
character in ZPL is >8
for all character sets.<app-id>
is the application-identifier (AI) for your barcode purpose<value>
is the (alpha-numeric) data to be encoded with the barcodeA good summary of UCC application-identifiers (AI) gives UCC-128, EAN-128 & GS1-128 Bar Code Explained (wayback archive from 2017).
Let's say you would use an AI of 10
and are encoding the batch number 1702ABCD
.
Then the resulting ZPL field data would be: ^FD>8101702ABCD^FS