Skip to content

Commit

Permalink
Warn with C.UTF-8 too
Browse files Browse the repository at this point in the history
See these glibc changes:

********************************************************************
commit 2897b231a6b71ee17d47d3d63f1112b2641a476c
Author: Bruno Haible <bruno@clisp.org>
Date:   Mon Sep 4 15:31:36 2023 +0200

    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>
*********************************************************************

via

*********************************************************************
  * debian/patches/any/git-c-utf-8-language.diff: backport support from
    upstream to treat C.<encoding> locale like C locale.  Closes: #874160.
*********************************************************************
  • Loading branch information
lionel- committed Sep 19, 2023
1 parent bd97d3a commit e606506
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/language.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ local_language <- function(lang, .local_envir = parent.frame()) {
# > (or LC_ALL) to a value other than ‘C’, before you can use a language
# > priority list through the LANGUAGE variable.
# --- https://www.gnu.org/software/gettext/manual/html_node/The-LANGUAGE-variable.html
if (identical(Sys.getenv("LANG"), "C")) {
if (Sys.getenv("LANG") %in% c("C", "C.UTF-8")) {
warning("Changing language has no effect when envvar LANG='C'")
}

Expand Down

0 comments on commit e606506

Please sign in to comment.