Added warning on encoding mismatch