From 14ae1a7d89da8f440ca487c4c807f039f9b0b1fd Mon Sep 17 00:00:00 2001 From: Davis Goglin Date: Wed, 16 Mar 2016 16:26:13 -0700 Subject: [PATCH] Fix python3 barcode type b length encoding --- escpos/escpos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/escpos/escpos.py b/escpos/escpos.py index 467cf4d..59ce938 100644 --- a/escpos/escpos.py +++ b/escpos/escpos.py @@ -442,7 +442,7 @@ class Escpos(object): self._raw(bc_types[bc.upper()]) if function_type.upper() == "B": - self._raw(chr(len(code))) + self._raw(six.int2byte(len(code))) # Print Code if code: