Android Thermal printer Arabic Issue

前端 未结 1 420
梦毁少年i
梦毁少年i 2021-01-11 15:56
public class Globals {
    // TODO IMPORTANT CONFIG CHANGES
    // ** IMPORTANT CONFIGURATION
    private static String serverRealUrl = \"http://www.myserver.com/api         


        
1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-11 16:58

    most easy would be to use the Epson SDK; because it does not care if it's an Epson printer - only the vendor ID in the device-filter for USB devices differs in between the vendors; but Star Micronics and other 100% compatibles work just fine. if you want to write your own driver, which literally means re-inventing the wheel; have a look at ESC/POS appendix C, page 73:

    for Arabic you'd need to select character table 13 with the ESC t command, which is IBM code-page CP864. the sequence would be: \x1B \x74 \xD. the output also would have to be encoded as CP864, converted from UTF-16, so that it matches the code-page, which the printer then expects.

    0 讨论(0)
提交回复
热议问题