You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to print latin-1 characters such as "á", "É", "ñ" but I get printed chinese characters instead. I have tried changing to other codepages such as "PORTUGUESE" or "MULTILINGUAL" but it prints the same chinese characters all the time.
Steps to reproduce
#!/usr/bin/python
# -*- coding: latin-1 -*-
from escpos.printer import Network
x = Network("192.168.123.100")
x.charcode(code="WEST_EUROPE")
x._raw("ñ\n".encode('latin-1'))
x.text("ñ\n") # same..
x.cut()
exit()
Device info
Printer: Xprinter XP-T80A firmware version 3.010PR6G
The Selftest indicates that it supports codepage 6 (West Europe) and many others. It also says: Resident Character: Alphanumeric and Simplified Chinese GB18030
python-escpos version: 2.2.0
python version: 3.6.13
operating system: Ubuntu 16.04LTS
The text was updated successfully, but these errors were encountered:
Hi,
could you please try out the version 3 pre-release?
Apart from that, do you have a manual for that printer? With that you should be able to obtain the byte sequence for the expected codepages. With that you could try with the raw-method first if your printer supports this really, and then use the Dummy-printer instance to compare what the lib generates.
Hello,
I ran out of paper, I will try version 3 as soon as I am able to get more. I have got a manual, but it does not indicate any esc/pos commands. However I found this russian tutorial and it indicates I should send these commands before changing the codepage (to russian text):
1F 1B 1F FE 01
1F 1B 1F FE 11
Do you know what these commands are ?
There is also some software .exe, I will try to tap on the socket with wireshark to get more info.
These numbers are likely the hex sequence for escpos codepage changes.
You can compare them to the output of this lib (use file printer, print to file and then compare in a hex editor), but I would assume this lib issues already the correct sequence.
Bug description
I am trying to print latin-1 characters such as "á", "É", "ñ" but I get printed chinese characters instead. I have tried changing to other codepages such as "PORTUGUESE" or "MULTILINGUAL" but it prints the same chinese characters all the time.
Steps to reproduce
Device info
Printer: Xprinter XP-T80A firmware version 3.010PR6G
The Selftest indicates that it supports codepage 6 (West Europe) and many others. It also says: Resident Character: Alphanumeric and Simplified Chinese GB18030
python-escpos version: 2.2.0
python version: 3.6.13
operating system: Ubuntu 16.04LTS
The text was updated successfully, but these errors were encountered: