Advance the method to check charset