mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
Fix byte format() on Python 3.
This commit is contained in:
@@ -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"))
|
||||
|
Reference in New Issue
Block a user