Improve charset detection by prioritizing charset according to user language (#1485669)