From b0afb8fe0ff1d87165af9df61501197a06240dda Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Sun, 28 Dec 2025 12:13:40 +0100 Subject: Sync with Gnulib stable-202507 code (a8ac9f9ce5) --- gl/localcharset.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'gl/localcharset.c') diff --git a/gl/localcharset.c b/gl/localcharset.c index 93c4baa4..32f6f78e 100644 --- a/gl/localcharset.c +++ b/gl/localcharset.c @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2024 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2025 Free Software Foundation, Inc. This file is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -380,7 +380,7 @@ static const struct table_entry alias_table[] = # if defined OS2 /* OS/2 */ /* The list of encodings is taken from "List of OS/2 Codepages" by Alex Taylor: - . + . See also "__convcp() of kLIBC": . */ { "CP1004", "CP1252" }, @@ -939,8 +939,10 @@ locale_charset (void) sprintf (buf, "CP%u", GetACP ()); } /* For a locale name such as "French_France.65001", in Windows 10, - setlocale now returns "French_France.utf8" instead. */ - if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0) + setlocale now returns "French_France.utf8" instead, or in the UTF-8 + environment (with modern system settings) "fr_FR.UTF-8". */ + if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0 + || strcmp (buf + 2, "UTF-8") == 0) codeset = "UTF-8"; else { -- cgit v1.2.3-74-g34f1