Working on encoding detection