斑马打印机塞尔维亚拉丁字符 [英] Zebra printer serbian latin characters

查看:334
本文介绍了斑马打印机塞尔维亚拉丁字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有斑马打印机RW220不打印塞尔维亚拉丁字符,如čćžšđ一个问题。我开发一个Android应用程序,它使用的打印机。印刷部分基于斑马SDK。下面是的code中的一部分:

I have a problem with Zebra printer RW220 not printing serbian latin characters, like čćžšđ. I developed an android app which uses the printer. The printing part is based on Zebra SDK. Here's the part of the code:

private byte[] getConfigLabel() {
    PrinterLanguage printerLanguage = printer.getPrinterControlLanguage();
    byte[] configLabel = null;
    if (printerLanguage == PrinterLanguage.ZPL) {
        try {
            configLabel = "^XA^FO17,16^GB379,371,8^FS^FT65,255^A0N,135,134^FDTEST^FS^XZ".getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    } else if (printerLanguage == PrinterLanguage.CPCL) {
        String cpclConfigLabel = "! 0 200 200 780 1\r\n" + "T ARIAL9PT.CPF 0 60 10 ABCČĆŽŠĐ\r\n"
        + "PRINT\r\n";
        configLabel = cpclConfigLabel.getBytes();
    }
    return configLabel;
}

使用的字体是宋体,我转换使用斑马工具,以公积金,用于打印机。我还添加了字符的字体,但它不打印。在这个例子中,它只是打印的ABC。而随着系统字体,它打印一些奇怪的字符。我也尝试添加T ARIAL9PT.CPF 0 60 10ABCČĆŽŠĐ\ r \ N之前的编码UTF-8行,但它不会做任何事情,同样的系统字体。 我怎样才能使它打印塞尔维亚拉丁字符?谢谢你。

The font used is Arial, which I converted using Zebra Utilities to CPF, for use with printer. I also added the characters to the font, but it doesn't print them. In this example, it just prints the ABC. And with the system fonts, it prints some strange characters. I also tried adding "ENCODING UTF-8" line before "T ARIAL9PT.CPF 0 60 10 ABCČĆŽŠĐ\r\n", but it doesn't do anything, same with the system fonts. How can I make it print serbian latin characters? Thanks.

编辑: ISO-8859-2打印C和C,但不Ž。

ISO-8859-2 prints Č and Ć, but not Ž.

推荐答案

终于解决了,用的是CP1250编码该溶液中,也称为Windows-1250

Finally solved, the solution was using the "CP1250" encoding, also known as Windows-1250.

这篇关于斑马打印机塞尔维亚拉丁字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆