Skip to content

USB Printer Encoding Problem with Chinese Characters #281

@SuperBianC

Description

@SuperBianC

thank 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions