Closed anpham293 closed 3 years ago
@tcd93 Hi, can you help, please, how to print cyrillic symbols? Printer model
@JRakhimov Took a look in the description and seems like it support cyrillic characters
Try adding the command 1B, 74, 17
// PrinterCommands.java
static final byte[] ENC_CYRIL = new byte[] {0x1B, 0x74, 0x17};
...
// in PrintLeftRight, add this to the begining
Thread.Write(PrinterCommands.ENC_CYRIL)
@tcd93 Amazing, works great, thank you
P.S. charset should be "windows-1251"
This also depends on your printer, not every printer support UTF-8 encoding
Vietnamese restaurants usually use SUNMI POS printer which DOES support it, but it does not follow the ESC/POS standard command
You have to customize your print methods such as
printLeftRight
to input special command before writing:// PrinterCommands.java static final byte[] ENC_UTF8 = new byte[] {0x1C, 0x43, (byte) 0xFF}; // SUMMI printer specific codes ... THREAD.write(PrinterCommands.ENC_UTF8); // add this line before writing
This is the link to the developer guide of SUNMI: https://file.cdn.sunmi.com/SUNMIDOCS/Sunmi-Printing-Service-ENCN.pdf
For ESC/POS compliant devices the command hex code is
1C 28 43 02 00 30 m
(FS ( C,m
depends on the model)
where is this code implemented -> which file
This also depends on your printer, not every printer support UTF-8 encoding
Vietnamese restaurants usually use SUNMI POS printer which DOES support it, but it does not follow the ESC/POS standard command
You have to customize your print methods such as
printLeftRight
to input special command before writing:This is the link to the developer guide of SUNMI: https://file.cdn.sunmi.com/SUNMIDOCS/Sunmi-Printing-Service-ENCN.pdf
For ESC/POS compliant devices the command hex code is
1C 28 43 02 00 30 m
(FS ( C,m
depends on the model)