Solved

Zebra ZPL II language printing a pound sign

Posted on 2011-03-19
9
3,818 Views
Last Modified: 2016-10-17
I'm trying to print a product barcode label using ZPLII language on a Zebra ZM400.  This is working except I'm unable to print a pound sign (£) which prints as ü.  This is the code I'm producing (this is written to a text file then copied to the printer port using a batch file):

^XA
^LH25,20
^FO25,10^A0,30,20^FDAuto Fade Light^FS
^FO260,45^A0,60,30^FD£20.00^FS
^FO50,100^BY2,3^BE,70^FDA3077^FS
^PQ1
^XB
^XZ
^EZ

A dollar sign ($) prints fine.  I think it's something to do with changing the code page sets but I have no idea how to do this.  There is another post with the same problem http://www.experts-exchange.com/Microsoft/Development/Q_25100714.html but this has not been answered.

Any help would be appreciated.

Thanks
0
Comment
Question by:Russell_Harper
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 26

Assisted Solution

by:MidnightOne
MidnightOne earned 500 total points
ID: 35173506
Which character set at you using?
0
 

Author Comment

by:Russell_Harper
ID: 35174941
Not sure, how can I check this?
0
 
LVL 48

Expert Comment

by:dbrunton
ID: 35344832
Look at http://fixunix.com/ibm-as400/106486-instructions-how-set-up-zebra-lp-2844-z.html

A solution to printing the pound sign is shown at the bottom.  Pay to read the article though.  They are prefixing their commands with % instead of ^ and it isn't necessarily the same model printer as yours.
0
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 

Accepted Solution

by:
Russell_Harper earned 0 total points
ID: 35390916
Managed to get a response from Zebra support:

---------------------------------------------------------------------------------------------------------------------------------------

I have commented your code for dissemination purposes.
The ^FX is the equivalent of a REM statement in BASIC programming and all text after this statement is transparent until a carriage return is issued so should be no need to remove for testing.
 
^XA                              ^FX Start Script
^LH25,20                     ^FX Set Label Home to x=25 y=20
^FO25,10                    ^FX Set Field Origin with respect to LH as x=25 y=10
^A0,30,20                    ^FX Use Font 0 with a character height of 30 Dots and width of 20  Dots
^FDAuto Fade Light     ^FX Print the Data
^FS                              ^FX and close the field definition
^FO260,45                  ^FX Set Field Origin with respect to LH as x=260 y=45
^A0,60,30                    ^FX Use Font 0 with a character height of 60 Dots and width of 30  Dots
^FD£20.00                   ^FX Print the data
^FS                              ^FX and close the field definition
^FO50,100                  ^FX Use Font 0 with a character height of 30 Dots and width of 20  Dots
^BY2,3                         ^FX Set barcode default as module width 2, ratio of 3
^BE,70                         ^FX Use a EAN-13 bar code barcode height 70 Dots
^FDA3077                    ^FX Print the Data
^FS                              ^FX close the field definition
^PQ1                           ^FX Set print Quantity to 1
^XB                              ^FX Suppress backed to enhance throughput
^XZ                              ^FX End Script
 
========================================================
^FX Unknown Command         ^EZ
========================================================
 
I have altered your code slightly after duplicating the error you have had. It now prints a £ for me.
Have a look in the attached pdf documents for a little more info.
Use the table within the ZPL manual page 928 if remapping $ is not a suitable character
 
 
I have remapped/substituted the $ symbol for £ using the following code: ^CI2,156,36            
And changed the data to:  ^FD$20.00 [Changes Highlighted below] Notice that you can have multiple ^CI commands within a script
The following statement gives a little more info.
 
‘We recommend that a ^CI command (or Unicode BOM) is included at the beginning of each
ZPL script. This is important when ZPL scripts with different encodings are being sent to a
single printer. To assist in the interleaving of encoding schemes, the printer maintains two
encoding states (^CI0 - 28 and ^CI29 - 30). It automatically acknowledges when it should
switch encoding states, allowing it to distinguish between encodings, and maintains a ^CI
for each, but endianess is shared’.
 
 
Try this code and see how you get on:
 
^XA                              ^FX Start Script
^LH25,20                     ^FX Set Label Home to x=25 y=20
^FO25,10                    ^FX Set Field Origin with respect to LH as x=25 y=10
^A0,30,20                    ^FX Use Font 0 with a character height of 30 Dots and width of 20  Dots
^FDAuto Fade Light     ^FX Print the Data
^FS                              ^FX and close the field definition
^FO260,45                  ^FX Set Field Origin with respect to LH as x=260 y=45
^A0,60,30                    ^FX Use Font 0 with a character height of 60 Dots and width of 30  Dots
^CI2,156,36                ^FX Using Uk Subset and codepage 850 substitute chr$ (36) for chr£ (156)
^FD$20.00                   ^FX Print the data
^FS                              ^FX and close the field definition
^FO50,100                  ^FX Use Font 0 with a character height of 30 Dots and width of 20  Dots
^BY2,3                         ^FX Set barcode default as module width 2, ratio of 3
^BE,70                         ^FX Use a EAN-13 bar code barcode height 70 Dots
^FDA3077                    ^FX Print the Data
^FS                              ^FX close the field definition
^PQ1                           ^FX Set print Quantity to 1
^XB                              ^FX Suppress back-feed to enhance throughput
^XZ                              ^FX End Script

---------------------------------------------------------------------------------------------------------------------------------------

Hopefully this will be of help to other users.

Russ
0
 

Author Closing Comment

by:Russell_Harper
ID: 35422316
The answer I submitted is the correct solution directly from Zebra and works
0
 

Expert Comment

by:Ganesh Pate
ID: 41846238
Hi,
In my case data is not coming its coming empty and removing the special character.

I have this type of text ....
ALK öntapadós teflonszövet 5058 AP Signod fóliázóhoz

but after printing...
ALK ntapads teflonszvet 5058 AP Signod flizhoz

can you please suggest how to resolve this issue.
0
 
LVL 48

Expert Comment

by:dbrunton
ID: 41846283
Ganesh, I suggest you open a new question.  This is a very old question and not many people will be looking at it.  Open a new one and you'll get more people looking at it.
0

Featured Post

Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This paper addresses the security of Sennheiser DECT Contact Center and Office (CC&O) headsets. It describes the DECT security chain comprised of “Pairing”, “Per Call Authentication” and “Encryption”, which are all part of the standard DECT protocol.
Or at least that’s the word according to a new blog from Tech Target on AWS’s new Managed Services (MS) offering. According to the blog, AWS is launching their AWS MS program to expedite the adoption of cloud by Fortune 1000 and Global 2000 companie…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question