add Chinese support via cp936

This commit is contained in:
freeyoung 2014-03-14 02:05:41 +08:00
parent 9f7e5861cd
commit 6a4fbc191f
1 changed files with 1 additions and 1 deletions

View File

@ -206,7 +206,7 @@ class Escpos:
def text(self, txt): def text(self, txt):
""" Print alpha-numeric text """ """ Print alpha-numeric text """
if txt: if txt:
self._raw(txt) self._raw(txt.encode('cp936'))
else: else:
raise TextError() raise TextError()