added check for charset set