|
return data.decode(), b'' |
This line caused a decoding error when run with Python 3.6:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd4 in position 0: invalid continuation byte
I'm wondering whether data.decode() will ever work for values in range [128, 256).
data.decode('latin1') solves my issue. But I think there may be similar cases in other parts of the project.
Pull Request: #85
The default encoding in Python 3 is utf-8, which doesn't work in this case. ascii won't work, either.
python-xlib/Xlib/protocol/rq.py
Line 427 in 63d5cf1
This line caused a decoding error when run with Python 3.6:
I'm wondering whether
data.decode()will ever work for values in range [128, 256).data.decode('latin1')solves my issue. But I think there may be similar cases in other parts of the project.Pull Request: #85
The default encoding in Python 3 is
utf-8, which doesn't work in this case.asciiwon't work, either.