Cyrillic symbols printing issue
See original GitHub issueHi! Sorry for my English in advance. I have an issue with printing Cyrillic symbols. The code I have written looks like this:
// Printing logo of the company
Bitonal algorithm = new BitonalThreshold(127);
BufferedImage githubBufferedImage = getImage(image);
EscPosImage escposImage = new EscPosImage(new CoffeeImageImpl(githubBufferedImage), algorithm);
BitImageWrapper imageWrapper = new BitImageWrapper();
imageWrapper.setJustification(EscPosConst.Justification.Left_Default);
pos.write(imageWrapper, escposImage);
pos.feed(5);
// Text styling
Style headStyle = new Style()
.setFontSize(Style.FontSize._1, Style.FontSize._1)
.setJustification(EscPosConst.Justification.Center);
pos.setCharacterCodeTable(EscPos.CharacterCodeTable.CP866_Cyrillic_2);
pos.writeLF(headStyle, "Ваш номер очереди:");
pos.feed(1);
This is a one part of the code. Other parts are similar to this except styling and text itself to be printed. I am writing this code on Linux, then checking it on Windows machine, where Xprinter XP-80 is connected.
But all the text after printing is in Chinese or Japanese, idk. Only text in English is correct. I’ve tried all given options from ChacterCodeTable.
Then tried to print something from different application (Office Word, tried to write clear Java code), and the result is correct. Many thanks in advance.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Cyrillic Letters are printed wrong - SAP Community
Hi experts, we have an unicode system and would like to print sapsript with cyrillic letters. If we print the sapscript as PDF...
Read more >Office 2013 does not print files with cyrillic names
Hi all, I have the following issue. My printer does not print files with cyrillic names. OS: Windows 10, it doesn't give me...
Read more >It is possible to print Cyrillic text? - Technical Support Portal
It is possible to print Cyrillic text combined with other special characters (e.g. ä,ö,ü,ß, etc). It is required to use CGTimes.
Read more >Eclipse printing wrong cyrillic character - java - Stack Overflow
I am making an app that uses fiscal printer, and the document that i send to the printer must be in Cyrillic. The...
Read more >Word 97+: Some Printers Will Not Print Russian Characters
go to folder Windows\System and find a file hpfcfg.exe · double-click on this file to execute it · Uncheck a check box called...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@anastaciocintra, Yes, I saw it. My solution is similar in some sense, except saving drawn Strings to PNG file. I’ve created class where I am drawing all Strings to canvas with fixed sizes using Graphic2D. Then I saved canvas to PNG file and then printing it using escpos-coffee. Now, app is working in production with this solution. I am getting new customer demands, which I will add to next version of the app. That time I’ll check printing without intermediate file savings. Until then I am looking for another solutions))
@alisherkasimovv , take a look on #44 Graphic2D solution