mirror of
https://github.com/xcat2/confluent.git
synced 2024-12-23 19:52:10 +00:00
Fallback to forced utf8 on unicodeerror
If LC_ALL is set to C, then unicode can be a problem.
This commit is contained in:
parent
203253e05f
commit
6997508a0c
@ -948,6 +948,8 @@ def main():
|
||||
clearpowermessage = False
|
||||
try:
|
||||
sys.stdout.write(data)
|
||||
except UnicodeEncodeError:
|
||||
sys.stdout.buffer.write(data.encode('utf8'))
|
||||
except IOError: # Some times circumstances are bad
|
||||
# resort to byte at a time...
|
||||
for d in data:
|
||||
|
Loading…
Reference in New Issue
Block a user