Printing Unicode Characters From android to bluetooth thermal printer

徘徊边缘 提交于 2019-12-22 01:05:32

问题


I have bluetooth/usb thermal Printer of model QS58. I want to print unicode characters like "मराठी"

When i connect printer to computer through usb and give print,it prints correctly. but, when printing through my android application it is printing invalid characters(chinese character).

I think windows is sending correct data to printer,but my application not.so please tell me ho can i send data to printer.

I have already tried following methods

mmOutStream.write("मराठी".getBytes("UFT-8"));

mmOutStream.write("मराठी".getBytes("UFT8"));

mmOutStream.write("\u0991\u0992".getBytes("UFT-8"));

mmOutStream.write("\u0991\u0992".getBytes());

回答1:


You've got your encoding as "UFT-8". Should this not be "UTF-8"??




回答2:


You shouldn't be able to do that. In documentation states that it only prints:

Printable content: English, numbers, symbols, Chinese characters

also Instruction set: ESC/POSCompatible instruction set

So maybe your charactares (i don't know what language is that) are in some region page code of ESC/POS.



来源:https://stackoverflow.com/questions/19706511/printing-unicode-characters-from-android-to-bluetooth-thermal-printer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!