USB Printer Encoding Problem with Chinese Characters
See original GitHub issuethank you for seeing my problem.
There is something wrong with my encoding, it occurs that Chinese characters are wrongly printed when I write like this :
printer.text("你好")
but I get wrong characters printed like “挂批”
I tried to set the encoding as #-- coding: gbk – ,but got encoding problem.
And I tried to use the magic encode like from escpos.magicencode import Encoder
, but got no module named escpos.magicencode
as ImportError.
So I wander how to set the encoding to make my printer print correct Chinese characters.
Sorry for my English and naive questions.
I have been working on this for one week and still could’t figure it out.
Thanks again.
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
USB Printer Encoding Problem with Chinese Characters
USB Printer Encoding Problem with Chinese Characters. ... There is something wrong with my encoding, it occurs that Chinese characters are wrongly printed...
Read more >Certain Simplified Chinese characters are not printed properly ...
This issue is caused by GB2312.NCD that it does not cover the full selection of characters mapping that includes traditional Chinese characters.
Read more >How to print traditional Chinese characters on Epson TM-T20 ...
Problem : Before I use the code provided by jkealey, the printer prints out "?" instead of the Chinese characters, but now it...
Read more >Chinese charcter display problem in a English Windows 10
This type issue may be related to the settings of the Language for non-Unicode programs. I would suggest you to follow these methods...
Read more >Thermal printer printing a lot of unwanted characters instea
If everything else prints fine, but chinese letters are a problem, then the issue would be likely fixable in code and related to...
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
Would you mind sharing which make/model of printer you have? This is important, because ESC/POS does not support Chinese text, but some printers have their own commands which you might be able to use.
maybe you can change codepage by if…else logics on the runtime.