Solved

Zebra ZPL II language printing a pound sign

Posted on 2011-03-19
9
3,673 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
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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Stuck in voice control mode on your Amazon Firestick?  Here is how to turn it off!!!
When you try to share a printer , you may receive one of the following error messages. Error message when you use the Add Printer Wizard to share a printer: Windows could not share your printer. Operation could not be completed (Error 0x000006…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

778 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