Collin Funk wrote:
> >> if (STREQ_OPT (locale_charset (), "ASCII",
> >> 'A', 'S', 'C', 'I', 'I', 0, 0, 0, 0))
> >> fold_file (...)
> >> else
> >> fold_file_multibyte (...)
I would rename the first function to 'fold_file_ascii' or 'fold_file_unibyte'.
> My understanding is that hard_locale checks whether the locale is "C" or
> "POSIX" not the character set in use.
Correct. If you want to test the encoding (with is, admittedly, the most
important characteristic of the LC_CTYPE category of the current locale),
you can
- test for specific encodings by using the value of locale_charset (),
- distinguish unibyte vs. multibyte locales by testing (MB_CUR_MAX > 1).
Bruno