beware : even if you need to distinguish between UTF-8 and ISO-8859-1, and you the following detection order (as chrigu suggests)
mb_detect_encoding('accentuée' , 'UTF-8, ISO-8859-1')
returns ISO-8859-1, while
mb_detect_encoding('accentué' , 'UTF-8, ISO-8859-1')
returns UTF-8
bottom line : an ending 'é' (and probably other accentuated chars) mislead mb_detect_encoding