Workaround crashes due to non-UTF-8 characters in process command-lines
commit443737ec620a699286b9b2e44dbcaac53f553812
authorYanichkin Alexander <Alexander_Sergey@mail.ru>
Fri, 8 Oct 2021 01:25:31 +0000 (8 09:25 +0800)
committerPaul Wise <pabs3@bonedaddy.net>
Fri, 8 Oct 2021 01:32:28 +0000 (8 09:32 +0800)
tree7563dedff725b5b1913604e7f04f14a23f2ffbb4
parentab35334d374e588bec12d201fb8869c536f0545d
Workaround crashes due to non-UTF-8 characters in process command-lines

Use the Python feature of replacing non-UTF-8 characters
with the U+FFFD REPLACEMENT CHARACTER (�).

This is only a workaround, a more useful action would be to guess the
encoding using chardet or similar and coerce the bytes into Unicode.

Fixes: https://bugs.launchpad.net/ubuntu/+source/iotop/+bug/1932523
Fixes: https://bugs.debian.org/737043
iotop/data.py