intl: Treat C.UTF-8 locale like C locale (BZ# 16621)
The wiki page https://sourceware.org/glibc/wiki/Proposals/C.UTF-8
says that "Setting LC_ALL=C.UTF-8 will ignore LANGUAGE just like it
does with LC_ALL=C." This patch implements it.
* intl/dcigettext.c (guess_category_value): Treat C.<encoding> locale
like the C locale.
Reviewed-by: Florian Weimer <[fweimer@redhat.com](mailto:fweimer@redhat.com)>
via
debian/patches/any/git-c-utf-8-language.diff: backport support from
upstream to treat C. locale like C locale. Closes: #874160.
The Debian checks use LANG=C.UTF-8, which now works "like the C locale",
so messages will no longer be translated.
══ Failed tests ════════════════════════════════════════════════════════════════
── Failure ('test-i18n.R:225:3'): i18n_set_language_option() changes message language ──
result$error_message not equal to "objet de type 'closure' non indiçable".
1/1 mismatches
x[1]: "object of type 'closure' is not subsettable"
y[1]: "objet de type 'closure' non indiçable"
── Failure ('test-i18n.R:232:3'): i18n_set_language_option() changes message language ──
result$error_message not equal to "objet de type 'closure' non indiçable".
1/1 mismatches
x[1]: "object of type 'closure' is not subsettable"
y[1]: "objet de type 'closure' non indiçable"
── Failure ('test-i18n.R:254:3'): i18n_set_language_option() sets up language inheritance ──
result$error_message not equal to "objeto de tipo 'closure' não possível dividir em subconjuntos".
1/1 mismatches
x[1]: "object of type 'closure' is not subsettable"
y[1]: "objeto de tipo 'closure' não possível dividir em subconjuntos"
── Failure ('test-i18n.R:261:3'): i18n_set_language_option() sets up language inheritance ──
result$error_message not equal to "objeto de tipo 'closure' não possível dividir em subconjuntos".
1/1 mismatches
x[1]: "object of type 'closure' is not subsettable"
y[1]: "objeto de tipo 'closure' não possível dividir em subconjuntos"
[ FAIL 4 | WARN 0 | SKIP 18 | PASS 819 ]
Error: Test failures
Execution halted