lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

lynx-dev lynx2.8.1rel2 patch


From: Leonid Pauzner
Subject: lynx-dev lynx2.8.1rel2 patch
Date: Tue, 3 Nov 1998 01:17:41 +0300 (MSK)

One more chartrans bug:

LYNXIMGMAP: show text in wrong charset (page converted twice),
fixed by adding META charset to this internal page
(the bug present in all versions starting from 2.7.1ac).

Should go to 2.8.1 bugfixes.



diff -u old/lymap.c ./lymap.c
--- old/lymap.c Sun Oct 18 14:30:36 1998
+++ ./lymap.c   Tue Nov  3 00:25:38 1998
@@ -19,6 +19,7 @@
 #include <LYGlobalDefs.h>
 #include <LYKeymap.h>
 #include <LYCharUtils.h>
+#include <LYCharSets.h>

 #ifdef DIRED_SUPPORT
 #include <LYUpload.h>
@@ -540,7 +541,21 @@
        LYEntify(&MapTitle, TRUE);
     }

-    sprintf(buf,"<head>\n<title>%s</title>\n</head>\n<body>\n", MapTitle);
+    sprintf(buf, "<html>\n<head>\n");
+    (*target->isa->put_block)(target, buf, strlen(buf));
+    sprintf(buf, "<META %s content=\"text/html; charset=%s\">\n",
+               "http-equiv=\"content-type\"",
+               LYCharSet_UC[current_char_set].MIMEname);
+    (*target->isa->put_block)(target, buf, strlen(buf));
+       /*
+        *  This page is a list of titles and anchors for them.
+        *  Since titles already passed SGML/HTML stage
+        *  they converted to current_char_set.
+        *  That is why we insist on META charset for this page.
+        */
+    sprintf(buf, "<title>%s</title>\n", MapTitle);
+    (*target->isa->put_block)(target, buf, strlen(buf));
+    sprintf(buf, "</head>\n<body>\n");
     (*target->isa->put_block)(target, buf, strlen(buf));

     sprintf(buf,"<h1><em>%s</em></h1>\n", MapTitle);
@@ -571,7 +586,7 @@
        (*target->isa->put_block)(target, MapTitle, strlen(MapTitle));
        (*target->isa->put_block)(target, "</a>\n", 5);
     }
-    sprintf(buf,"</%s>\n</body>\n", ((keypad_mode == NUMBERS_AS_ARROWS) ?
+    sprintf(buf,"</%s>\n</body>\n</html>\n", ((keypad_mode == 
NUMBERS_AS_ARROWS) ?
                                     "ol" : "ul"));
     (*target->isa->put_block)(target, buf, strlen(buf));



reply via email to

[Prev in Thread] Current Thread [Next in Thread]