Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.3k views
in Technique[技术] by (71.8m points)

utf 8 - Print characters with an acute in ZPL

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
  • Note that the file encoding is ANSI.
  • Note the use of the ZPL command ^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
  • Note that the file encoding is UTF-8.
  • Note the use of the ZPL command ^CI28 (28 => Unicode (UTF-8 encoding) - Unicode Character Set).

Do you know what's wrong in the first case?

Thank you for helping.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...