diff --git a/src/escpos/magicencode.py b/src/escpos/magicencode.py index 23fa9e1..b36b844 100644 --- a/src/escpos/magicencode.py +++ b/src/escpos/magicencode.py @@ -211,10 +211,9 @@ class MagicEncode(object): # is different, emit a change command. if encoding != self.encoding: self.encoding = encoding - self.driver._raw(b'{}{}'.format( - CODEPAGE_CHANGE, - six.int2byte(self.encoder.get_sequence(encoding)) - )) + self.driver._raw( + CODEPAGE_CHANGE + + six.int2byte(self.encoder.get_sequence(encoding))) if text: self.driver._raw(CodePages.encode(text, encoding, errors="replace"))