diff options
Diffstat (limited to 'gl/localcharset.c')
| -rw-r--r-- | gl/localcharset.c | 10 |
1 files changed, 6 insertions, 4 deletions
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 @@ | |||
| 1 | /* Determine a canonical name for the current locale's character encoding. | 1 | /* Determine a canonical name for the current locale's character encoding. |
| 2 | 2 | ||
| 3 | Copyright (C) 2000-2006, 2008-2024 Free Software Foundation, Inc. | 3 | Copyright (C) 2000-2006, 2008-2025 Free Software Foundation, Inc. |
| 4 | 4 | ||
| 5 | This file is free software: you can redistribute it and/or modify | 5 | This file is free software: you can redistribute it and/or modify |
| 6 | it under the terms of the GNU Lesser General Public License as | 6 | it under the terms of the GNU Lesser General Public License as |
| @@ -380,7 +380,7 @@ static const struct table_entry alias_table[] = | |||
| 380 | # if defined OS2 /* OS/2 */ | 380 | # if defined OS2 /* OS/2 */ |
| 381 | /* The list of encodings is taken from "List of OS/2 Codepages" | 381 | /* The list of encodings is taken from "List of OS/2 Codepages" |
| 382 | by Alex Taylor: | 382 | by Alex Taylor: |
| 383 | <http://altsan.org/os2/toolkits/uls/index.html#codepages>. | 383 | <https://altsan.org/os2/toolkits/uls/index.html#codepages>. |
| 384 | See also "__convcp() of kLIBC": | 384 | See also "__convcp() of kLIBC": |
| 385 | <https://github.com/bitwiseworks/libc/blob/master/src/emx/src/lib/locale/__convcp.c>. */ | 385 | <https://github.com/bitwiseworks/libc/blob/master/src/emx/src/lib/locale/__convcp.c>. */ |
| 386 | { "CP1004", "CP1252" }, | 386 | { "CP1004", "CP1252" }, |
| @@ -939,8 +939,10 @@ locale_charset (void) | |||
| 939 | sprintf (buf, "CP%u", GetACP ()); | 939 | sprintf (buf, "CP%u", GetACP ()); |
| 940 | } | 940 | } |
| 941 | /* For a locale name such as "French_France.65001", in Windows 10, | 941 | /* For a locale name such as "French_France.65001", in Windows 10, |
| 942 | setlocale now returns "French_France.utf8" instead. */ | 942 | setlocale now returns "French_France.utf8" instead, or in the UTF-8 |
| 943 | if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0) | 943 | environment (with modern system settings) "fr_FR.UTF-8". */ |
| 944 | if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0 | ||
| 945 | || strcmp (buf + 2, "UTF-8") == 0) | ||
| 944 | codeset = "UTF-8"; | 946 | codeset = "UTF-8"; |
| 945 | else | 947 | else |
| 946 | { | 948 | { |
