mirror of
https://github.com/xcat2/confluent.git
synced 2025-02-02 12:04:46 +00:00
Fix non-ascii unicode handling of consoles
This commit is contained in:
parent
c925353f02
commit
0f3014957b
@ -59,11 +59,12 @@ def _unicode_list(currlist):
|
||||
|
||||
|
||||
def send(handle, data):
|
||||
if isinstance(data, str) or isinstance(data, unicode):
|
||||
if isinstance(data, unicode):
|
||||
try:
|
||||
data = data.encode('utf-8')
|
||||
except AttributeError:
|
||||
pass
|
||||
if isinstance(data, str) or isinstance(data, unicode):
|
||||
# plain text, e.g. console data
|
||||
tl = len(data)
|
||||
if tl == 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user