1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-24 14:03:55 +01:00

pyterm: fix problems with German umlauts as input

This commit is contained in:
Oleg Hahm 2015-09-15 12:17:55 +02:00
parent 1e0d1d4be6
commit 3b8aa9b476

View File

@ -241,7 +241,10 @@ class SerCmd(cmd.Cmd):
"out" % line)
for tok in line.split(';'):
tok = self.get_alias(tok)
self.ser.write((tok.strip() + "\n").encode("utf-8"))
if sys.version_info[0] == 2:
self.ser.write((tok.strip() + "\n").decode("utf-8").encode("utf-8"))
else:
self.ser.write((tok.strip() + "\n").encode("utf-8"))
def do_help(self, line):
"""Do not use Cmd's internal help function, but redirect to the