From 214aa0d36301ca72a0a57201221f3b80e340305e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Elsd=C3=B6rfer?= Date: Fri, 26 Aug 2016 15:14:02 +0200 Subject: [PATCH] Fix issue with manually setting the encoding. --- src/escpos/escpos.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/escpos/escpos.py b/src/escpos/escpos.py index 05e4ab4..276ded9 100644 --- a/src/escpos/escpos.py +++ b/src/escpos/escpos.py @@ -217,7 +217,8 @@ class Escpos(object): if code.upper() == "AUTO": self.magic.force_encoding = False else: - self.magic.encoding = self.magic.codepage_sequence(code) + self.magic.codepage_sequence(code) + self.magic.encoding = code self.magic.force_encoding = True def barcode(self, code, bc, height=64, width=3, pos="BELOW", font="A", align_ct=True, function_type="A"):