英文:
ESC POS Print special characters (ö)
问题
我对ESC Pos打印非常陌生。
我正在编写一个打印小票的应用程序,如果我尝试打印一个'ö',我得到一个'?'。
我已经将Codepage 设置为CP437,它应该支持'ö'作为一个字符。
在文档中解释了如何打印特殊字符,但我就是无法让它工作:
以下是文档中的片段。
编辑1(添加了代码):
MainActivity.BLUETOOTH_PRINTER.BT_Write(new byte[] {0x1B, 0x52, 0x7});
使用MainActivity.BLUETOOTH_PRINTER_BT_Write()
,我可以打印byte[]
部分,然而打印上述代码会给我一个很长(200个字符)的随机内容页面。
以下是完整文档:
<https://sparkag.com.br/wp-content/uploads/2016/06/ESC_POS-AK912-English-Command-Specifications-V1.4.pdf>
英文:
I'm very new to ESC Pos printing.
Im writing an app which prints receipts, if I try to print an 'ö' I get an '?'.
I already set the Codepage to CP437, which should support 'ö' as an character.
In the documentation it explains how I can print special characters, but I just cant get it working:
Heres the snippet from the doc.
Edit 1 (code added):
MainActivity.BLUETOOTH_PRINTER.BT_Write(new byte[] {0x1B, 0x52, 0x7});
Using MainActivity.BLUETOOTH_PRINTER_BT_Write()
I can print byte[]
parts, however printing above code gives me a long page (200 characters) of random stuff.
Heres the full documentation:
<https://sparkag.com.br/wp-content/uploads/2016/06/ESC_POS-AK912-English-Command-Specifications-V1.4.pdf>
答案1
得分: 0
这可能是一个特殊字符,需要使用""来显示。
英文:
It is probably a special character and needs a "" to show.
专注分享java语言的经验与见解,让所有开发者获益!
评论