mirror of
https://github.com/xcat2/confluent.git
synced 2026-01-12 02:52:30 +00:00
Fix non-ascii unicode handling of consoles
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user