          # Windows has issues sharing the log file with sub-processes, so log GUI separately
          filename += "_gui.log" if command == "gui" else ".log"
  
      should_rotate = os.path.isfile(filename)
      log_file = RotatingFileHandler(filename, backupCount=1)
      if should_rotate:
          log_file.doRollover()
      log_file.setFormatter(log_format)
      log_file.setLevel(loglevel)
      return log_file
 
</s> remove             self.append(line + "\n")
 </s> add             self.append(f"{line}\n") </s> remove     original_traceback = traceback.format_exc()
 </s> add     original_traceback = traceback.format_exc().encode("utf-8") </s> remove     freeze_log = list(_DEBUG_BUFFER)
 </s> add     freeze_log = [line.encode("utf-8") for line in _DEBUG_BUFFER] </s> remove     with open(filename, "w") as outfile:
 </s> add     with open(filename, "wb") as outfile: </s> remove         outfile.write(sysinfo)
 </s> add         outfile.write(sysinfo.encode("utf-8"))
    log_file = RotatingFileHandler(filename, backupCount=1, encoding="utf-8")
          # Windows has issues sharing the log file with sub-processes, so log GUI separately
          filename += "_gui.log" if command == "gui" else ".log"
  
      should_rotate = os.path.isfile(filename)
    log_file = RotatingFileHandler(filename, backupCount=1, encoding="utf-8")
      if should_rotate:
          log_file.doRollover()
      log_file.setFormatter(log_format)
      log_file.setLevel(loglevel)
      return log_file
keep keep keep keep replace keep keep keep keep keep
 Bugfix - lib.logger - Force file writing to urf-8 
lib/logger.py