add encoding detection config