问题
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