aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDai Sato <satodai@w3m.jp>2012-05-22 09:45:56 +0000
committerDai Sato <satodai@w3m.jp>2012-05-22 09:45:56 +0000
commite7fe8d004d4cac5ae469fb2cd9ba16332d58a456 (patch)
treea69de9fbcc49a57887e6b402f1abca98b6364fe3
parentcorrection: 0.5.2 -> 0.5.3 (diff)
downloadw3m-e7fe8d004d4cac5ae469fb2cd9ba16332d58a456.tar.gz
w3m-e7fe8d004d4cac5ae469fb2cd9ba16332d58a456.zip
parse META CHARSET
Diffstat (limited to '')
-rw-r--r--ChangeLog6
-rw-r--r--file.c11
-rw-r--r--html.c6
-rw-r--r--version.c.in4
4 files changed, 19 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index f9162e1..2e44b9b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-05-22 Enu <theme.of.n@gmail.com>
+
+ * file.c, HTML.c: parse META CHARSET.
+
2011-01-17 Dai Sato <satodai@w3m.jp>
* correction: ChangeLog of 2011-01-15 (0.5.2 -> 0.5.3)
@@ -9304,4 +9308,4 @@ a * [w3m-dev 03276] compile error on EWS4800
* release-0-2-1
* import w3m-0.2.1
-$Id: ChangeLog,v 1.1051 2011/01/17 11:53:57 inu Exp $
+$Id: ChangeLog,v 1.1052 2012/05/22 09:45:56 inu Exp $
diff --git a/file.c b/file.c
index d4c47fd..567d41e 100644
--- a/file.c
+++ b/file.c
@@ -1,4 +1,4 @@
-/* $Id: file.c,v 1.265 2010/12/15 10:50:24 htrb Exp $ */
+/* $Id: file.c,v 1.266 2012/05/22 09:45:56 inu Exp $ */
#include "fm.h"
#include <sys/types.h>
#include "myctype.h"
@@ -5020,10 +5020,17 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
HTMLlineproc1(tmp->ptr, h_env);
return 1;
case HTML_META:
- p = q = NULL;
+ p = q = r = NULL;
parsedtag_get_value(tag, ATTR_HTTP_EQUIV, &p);
parsedtag_get_value(tag, ATTR_CONTENT, &q);
#ifdef USE_M17N
+ parsedtag_get_value(tag, ATTR_CHARSET, &r);
+ if (r) {
+ /* <meta charset=""> */
+ SKIP_BLANKS(r);
+ meta_charset = wc_guess_charset(r, 0);
+ }
+ else
if (p && q && !strcasecmp(p, "Content-Type") &&
(q = strcasestr(q, "charset")) != NULL) {
q += 7;
diff --git a/html.c b/html.c
index 2359ca0..bca227e 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.32 2010/08/14 01:29:40 htrb Exp $ */
+/* $Id: html.c,v 1.33 2012/05/22 09:45:56 inu Exp $ */
#include "html.h"
/* Define HTML Tag Infomation Table */
@@ -37,8 +37,8 @@ unsigned char ALST_TABLE[] =
ATTR_CELLPADDING, ATTR_VSPACE, ATTR_CORE
};
#define MAXA_TABLE MAXA_CORE + 6
-unsigned char ALST_META[] = { ATTR_HTTP_EQUIV, ATTR_CONTENT, ATTR_CORE };
-#define MAXA_META MAXA_CORE + 2
+unsigned char ALST_META[] = { ATTR_HTTP_EQUIV, ATTR_CONTENT, ATTR_CHARSET, ATTR_CORE };
+#define MAXA_META MAXA_CORE + 3
unsigned char ALST_FRAME[] = { ATTR_SRC, ATTR_NAME, ATTR_CORE };
#define MAXA_FRAME MAXA_CORE + 2
unsigned char ALST_FRAMESET[] = { ATTR_COLS, ATTR_ROWS, ATTR_CORE };
diff --git a/version.c.in b/version.c.in
index 27dab36..31d30e4 100644
--- a/version.c.in
+++ b/version.c.in
@@ -1,5 +1,5 @@
-/* $Id: version.c.in,v 1.48 2011/01/15 07:52:48 inu Exp $ */
-#define CURRENT_VERSION "w3m/0.5.3"
+/* $Id: version.c.in,v 1.49 2012/05/22 09:45:56 inu Exp $ */
+#define CURRENT_VERSION "w3m/0.5.3+cvs"
#ifndef FM_H
char *w3m_version = CURRENT_VERSION;