Backslash (\) and Cent sign (¢)

If you send the following ZPL string to the printer intending for the backslash (\) to print, the resulting label will show a cent sign (¢) instead:

^XA
^FO50,50^A0N,80,70^FDABCD\1234^FS
^XZ

The resulting label will look like this:


      ABCD¢1234

The reason this happens is because the printers code page does not follow Code Page 850 entirely. ___________________________________________________________________________________________

^CI13

In order to print the backslash (\) you need to set the printers code page to Code Page 850.

Insert a ^CI13 command into the ZPL format to set the printers character set to Code Page 850 to print the backslash (\).

^XA
^CI13
^FO50,50^A0N,80,70^FDABCD\1234^FS
^XZ

The resulting label will look like this:


      ABCD\1234

____________________________________________________________________________________________

^CI13 and ^CI0

If you need to print the backslash (\) in one field and the cent sign (¢) in another field the following ZPL script can be used:

^XA
^CI13
^FO50,50^A0N,80,70^FDABCD\1234^FS
^CI0
^FO50,150^A0N,80,70^FD.10\^FS
^XZ

The ^CI13 sets the code page to 850 for the first field to print the backslash (\), and then the ^CI0 sets the code page back to the printers default code page resulting in the cent sign (¢) printing.

The resulting label will look like this:


      ABCD\1234
      .10¢

__________________________________________________________________________________________

^CI13 and using decimal values to enter the characters into the ZPL

If you need the backslash (\) and the cent sign (¢) printed in the same field or if you just want to keep the printers code page set to 850 all the time you can do the following.

^XA
^CI13
^FO50,50^A0N,80,70^FDABCD\1234 .50x^FS
^FO50,150^A0N,80,70^FD.10x^FS
^XZ

Where the small x's are shown in the format you will have to key in the decimal value for the cent sign (¢).
Code Page 850 shows that decimal value 189 is the value for the cent sign (¢).
The following screen shot shows how decimal 189 looks in the DOS text editor.
To key in the character hold down the Ctrl Key and then type 189 on the keyboard Num Pad at far right side of the keyboard.
Keep in mind that different text editors may have their character sets mapped in different ways. To demonstrate this ZPL file will result in the label sample shown its best to try the DOS text editor and then send the file to the printer from the DOS command line.

The resulting label will look like this:


      ABCD\1234 .50¢
      .10¢

___________________________________________________________________________________________

^FH ^CI13

Yet another way to print the backslash (\) and the cent symbol (¢) is by using the Field Hex (^FH_) ZPL command.

The ZPL sample looks like this:

^XA
^CI13
^FO50,50^A0N,80,70^FH_^FDABCD_5C1234 .50_BD^FS
^FO50,150^A0N,80,70^FH_^FD.10_BD^FS
^XZ

The ^CI13 sets the printer to Code Page 850
The underscore ( _ ) is followed by the hexadecimal value of the character that you want printed.

_BD = the cent sign (¢)
_5C =  the backslash (\)

The resulting label will look like this:


      ABCD\1234 .50¢
      .10¢