If I send the ZPL commands below to a Zebra printer, it prints AmitiÙ
:
^XA
^FO50,20
^CI7
^A0N,25,15
^FD
Amitié
^FS
^XZ
ANSI
.^CI7
(7 => Single Byte Encoding - France 1 Character Set).On the other hand, if I send the ZPL commands below to a Zebra printer, it prints Amitié
(which is what I actually need to get):
^XA
^FO50,20
^CI28
^A0N,25,15
^FD
Amitié
^FS
^XZ
UTF-8
.^CI28
(28 => Unicode (UTF-8 encoding) - Unicode Character Set).Do you know what's wrong in the first case?
Thank you for helping.
There is not a separate command to draw a simple horizontal or vertical line, but the ^GB command can be used for this purpose by drawing a rectangle with height = 1 (horizontal line) or width = 1 (vertical line).
Zebra Programming Language (ZPL) is the command language used by all ZPL compatible printers. It is a command based language used by the printers as instructions to create the images printed on the labels.
The ZPL command ^FW – Field Orientation can be used to rotate the printout. The ^FW command sets the default orientation for all command fields that have an orientation (rotation) parameter. Fields can be rotated 0, 90, 180, or 270 degrees clockwise by using this command.
Use UTF-8 by placing a ^CI28
command at the top of your ZPL template, eg
^XA
^CI28
^CF0,80
^FO70,40^FDavión^FS
^XZ
According to the programing guide document from Zebra ^CI
using 7 will get you Code Page 850 with some specific character replacements. When you say you had the file encoded in ANSI, I assume you mean Code Page Windows-1252 or ISO-8859-1 (latin1).
The character é
in Windows-1252 and latin1 is #00E9, but that's Ú
in 850; you would want #0082 for é
in 850. Using ^CI7
you could apparently also get an é
with #007B since that's one of the specific character replacements made with that command.
Using UTF8 (with ^CI28
) is probably the way to go since it's widely supported and understood, but note that you could also try ^CI27
(which may work even if you have an older version of the Zebra firmware that doesn't support ^CI28
) and that should get you code page 1252. If that doesn't work you'll need to encode your text using code page 850.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With