--- ../../contrib/file-4/src/apprentice.c +++ ../../contrib/file-4/src/apprentice.c -550,8 +550,10 @@ set_test_type(struct magic *mstart, struct magic *m) case FILE_REGEX: case FILE_SEARCH: /* binary test if pattern is not text */ +#ifndef COMPILE_ONLY if (file_looks_utf8(m->value.s, m->vallen, NULL, NULL) == 0) mstart->flag |= BINTEST; +#endif /* COMPILE_ONLY */ break; case FILE_DEFAULT: /* can't deduce anything; we shouldn't see this at the