> How about trying a list? en_US.8859-1 is widely available even if not
> actually installed. I don't know which non-utf8 locales are widely
> installed, personally I have en_GB.8859-1. We have several German devs
> so maybe de_DE.8859-1? Perhaps jp_JP.EUC-JP?
While I couldn't get SVN_TEST_SKIP2 to work because the availability
of a locale cannot be tested at preprocessing time, I found out that
returning an SVN_ERR_TEST_SKIPPED error has the same effect.
I like your idea of trying a list. Here is what I ended up with:
if ((! setlocale(LC_ALL, "English.1252")) &&
(! setlocale(LC_ALL, "German.1252")) &&
(! setlocale(LC_ALL, "French.1252")) &&
(! setlocale(LC_ALL, "en_US.ISO-8859-1")) &&
(! setlocale(LC_ALL, "en_GB.ISO-8859-1")) &&
(! setlocale(LC_ALL, "de_DE.ISO-8859-1")))
return svn_error_createf(SVN_ERR_TEST_SKIPPED, NULL, "None of
the locales English.1252, German.1252, French.1252, en_US.ISO-8859-1,
en_GB.ISO-8859-1, and de_DE.ISO-8859-1 are installed.");