I have a few elog files that contain non-ASCII characters. With LC_ALL=C, elogv (built for Python 3.6) crashes during startup while reading one of these files. It prints an empty frame (which I've omitted except for the bottom line) and the following traceback:
Traceback (most recent call last):────── Press F1 or h to show the help screen ┘
File "/usr/lib/python-exec/python3.6/elogv", line 693, in <module>
File "/usr/lib64/python3.6/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/lib/python-exec/python3.6/elogv", line 236, in __init__
File "/usr/lib/python-exec/python3.6/elogv", line 373, in init_screen
File "/usr/lib/python-exec/python3.6/elogv", line 482, in fill_file_pad
self.packages.append( (filepath, cat, pn, date, self.get_class(filepath)) )
File "/usr/lib/python-exec/python3.6/elogv", line 536, in get_class
classes = re.findall("LOG:|INFO:|WARN:|ERROR:", f.read())
File "/usr/lib64/python3.6/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 86: ordinal not in range(128)
Clearly elogv shouldn't assume that the character encoding of elog files is valid for the current locale, and it mustn't crash even if they contain garbage.
I agree that we have a bug here but I don't see high priority with this. Can you help out with a patch against latest Git master of elogv (https://gitweb.gentoo.org/proj/elogv.git/)?