Yann Droneaud [off-list ref] writes:
+# check UTF-8 locale availability
+test_utf8 () {
+ if test_have_prereq PERL ; then
+ # output an en_US.UTF-8 locale compatible name
+ GIT_LC_UTF8=`$PERL_PATH $GIT_BUILD_DIR/t/lib-locale.pl`
+ fi
+ if test -z "$GIT_LC_UTF8" ; then
+ return 1
+ else
+ test_set_prereq UTF8
+ return 0
+ fi
+}
Nice abstraction to have a helper function that picks a locale to be used
when we want to test UTF-8 thingy. Perhaps pick_utf8_locale might be a
better name, though.
The comment in the function is not wrong per-se, but it and the
implementation in 1/4 may be too restrictive---all it needs to do is to
pick a locale that is UTF-8, and it does not necessarily have to be en_US,
no?