improve file encoding detection

Created by  tzemanovic  on January 26, 2026
6LF2U2Y6QOQ7BREI6L26RXMQNKNEBOW2YUUHEIYELDP2C7PJG5XAC
Change contents