add check for mb_internal_encoding being UTF-8