Building grep-3.11 on FreeBSD 14.0, "make check" reports that the fmbtest test is skipped: fmbtest: skipped test: this system lacks the cs_CZ.UTF-8 locale SKIP: fmbtest But $ locale -a | grep cs_CZ cs_CZ.ISO8859-2 cz_CZ.UTF-8 shows that the system does have this locale. The cause is that this invocation of 'locale' does not work: $ locale -k LC_CTYPE Unknown keyword: `LC_CTYPE` But this one works: $ locale charmap UTF-8 => Patch attached. It fixes the problem: it makes the test PASS. 'locale charmap' is known to work portably for ages; see https://git.savannah.gnu.org/gitweb/?p=libiconv.git;a=tree;f=libcharset/tools;h=f756e65e5ea8fef47afc8bb7ae1094e169012c78;hb=HEAD