Viewing logfiles is broken when non UTF-8 char was emitted

Viewing a logfile which contains a non UTF-8 character does not work anymore:

Error occured when reading log 66124: 'utf-8' codec can't decode byte 0xfc in position 7117: invalid start byte

This file has at the above position the German ü Umlaut char (0xfc).

Problem is that the logfile is created without any charset (botsinit.py, line #465 or #471), but when the file is read for displaying, file is opened with charset UTF-8 (views.py, line #1248) which then crashed when file contains invalid UTF-8 chars (like 0xfc is).

My suggestion is to create the logfiles with charset UTF-8 instead of None.

Assignee Loading
Time tracking Loading