Simpler way to check UTF-8.

It avoids to call the `mb_check_encoding` function.