Force text to be compatible with CP437
This avoids a conversion error in PyFIS.
This commit is contained in:
parent
95d335db99
commit
c1d36b508b
1 changed files with 2 additions and 0 deletions
|
@ -33,6 +33,7 @@ class BubaCmd:
|
|||
:param align: alignment options, see MIS1TextDisplay.ALIGN_*
|
||||
:return:
|
||||
"""
|
||||
text = text.encode("CP437", "replace").decode("CP437") # force text to be CP437 compliant
|
||||
if self.display is not None:
|
||||
self.display.simple_text(page, row, col, text, align)
|
||||
self.send({
|
||||
|
@ -59,6 +60,7 @@ class BubaCmd:
|
|||
:param align: alignment options, see MIS1TextDisplay.ALIGN_*
|
||||
:return:
|
||||
"""
|
||||
text = text.encode("CP437", "replace").decode("CP437") # force text to be CP437 compliant
|
||||
if self.display is not None:
|
||||
self.display.text(page, row, col_start, col_end, text, align)
|
||||
self.send({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue