Solved

Zebra ZPL II language printing a pound sign

Posted on 2011-03-19
9
3,513 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
9 Comments
 
LVL 26

Assisted Solution

by:MidnightOne
MidnightOne earned 500 total points
Comment Utility
Which character set at you using?
0
 

Author Comment

by:Russell_Harper
Comment Utility
Not sure, how can I check this?
0
 
LVL 47

Expert Comment

by:dbrunton
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Accepted Solution

by:
Russell_Harper earned 0 total points
Comment Utility
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
Comment Utility
The answer I submitted is the correct solution directly from Zebra and works
0
 

Expert Comment

by:Ganesh Pate
Comment Utility
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 47

Expert Comment

by:dbrunton
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What do we know about Legacy Video Conferencing? - Full IT support needed! - Complicated systems at outrageous prices! - Intense training required! Highfive believes we need to embrace a new alternative.
In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video discusses moving either the default database or any database to a new volume.

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now