Welcome to OGeek Q&A 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 Reply

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...