summaryrefslogtreecommitdiffstats
path: root/src/LYCharSets.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 19:36:21 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 19:36:21 +0000
commit8e342f22e8b6e7c4c86d3d94625a00a61116ae59 (patch)
tree677b58e869feafe33a51d7593bd9f8fbcca7b442 /src/LYCharSets.c
parentAdding debian version 2.9.0rel.0-2. (diff)
downloadlynx-8e342f22e8b6e7c4c86d3d94625a00a61116ae59.tar.xz
lynx-8e342f22e8b6e7c4c86d3d94625a00a61116ae59.zip
Merging upstream version 2.9.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/LYCharSets.c')
-rw-r--r--src/LYCharSets.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/src/LYCharSets.c b/src/LYCharSets.c
index 94b7a04..f5f1633 100644
--- a/src/LYCharSets.c
+++ b/src/LYCharSets.c
@@ -1,5 +1,5 @@
/*
- * $LynxId: LYCharSets.c,v 1.71 2021/06/29 22:01:12 tom Exp $
+ * $LynxId: LYCharSets.c,v 1.74 2024/03/15 16:15:07 tom Exp $
*/
#include <HTUtils.h>
#include <HTCJK.h>
@@ -605,34 +605,15 @@ static void HTMLSetDisplayCharsetMatchLocale(int i)
* We have no intention to pass CJK via UCTransChar if that happened.
* Let someone from CJK correct this if necessary.
*/
- DisplayCharsetMatchLocale = TRUE; /* old-style */
- return;
-
- } else if (strncasecomp(LYCharSet_UC[i].MIMEname, "cp", 2) ||
- strncasecomp(LYCharSet_UC[i].MIMEname, "windows", 7)) {
- /*
- * Assume dos/windows displays usually on remote terminal, hence it
- * rarely matches locale. (In fact, MS Windows codepoints locale are
- * never seen on UNIX).
- */
- match = FALSE;
+ match = TRUE; /* old-style */
+ } else if (!strncasecomp(LYCharSet_UC[i].MIMEname, "cp", 2) ||
+ !strncasecomp(LYCharSet_UC[i].MIMEname, "windows", 7)) {
+ match = FALSE; /* Windows locale is never seen on UNIX */
} else {
- match = TRUE; /* guess, but see below */
-
-#if !defined(LOCALE)
- if (LYCharSet_UC[i].enc != UCT_ENC_UTF8)
- /*
- * Leave true for utf-8 display - the code doesn't deal very well
- * with this case. - kw
- */
- match = FALSE;
+#if defined(LOCALE)
+ match = !UCForce8bitTOUPPER; /* disable locale (from lynx.cfg) */
#else
- if (UCForce8bitTOUPPER) {
- /*
- * Force disable locale (from lynx.cfg)
- */
- match = FALSE;
- }
+ match = (LYCharSet_UC[i].enc == UCT_ENC_UTF8);
#endif
}