Hello! Need your help
4 days already as I try to print the text in Russian but everything is even. The printer uses the ESC / POS protocol. Works through the comport. With a grief in half, I found a wrapper class for the comport and learned how to send commands. And everything would be fine, but as soon as it came to the Russian language - the work got up. After rereading the protocol, I came across the "Set charecter code table" command, which makes it possible to choose encodings in the printer itself for the correct display of languages. One of the parameters was the PC866 encoding, which points to the Cyrillic alphabet. When this coding was connected, the Russian should have earned it, but krakozabliki appeared again on the print. Having opened the table CP866 I saw that these cracks are part of the table. Taking the codes of letters from this table and sending them to print, I still got the Russian language. And if we take and compare the codes, for example, the letters' A ', then the difference between them will be - 64. (code' A 'C ++ = 192,' A'CP866 = 128). Interestingly, when using CP866 encoding for the console (setConsoleCP, setConsoleCPOut), normal Russian text is displayed, and when outputting to the printer, we get short-curved text.
Tell me, maybe you need to somehow process the text? Why don't the encodings match?