test for thrown error when no charset could be set