Fixing a number of bugs related to encodings (extra newlines + misdetection in linux2x)

Created by  pmeunier  on July 3, 2021
4DNDMC7IUZNYLDEQQYYF5K3G2QWWXGQENTEWPNTM6XKQEFPW7L3QC
Change contents