aboutsummaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@vega.ocn.ne.jp>2012-05-22 14:09:07 +0000
committerTatsuya Kinoshita <tats@vega.ocn.ne.jp>2012-05-22 14:09:07 +0000
commit0b18a8df294692c754ae4c6b29966ef72dd266b5 (patch)
tree809ebe672966b76ca4dbdbe92a287c8df2c604af /file.c
parentRemove garbage files (diff)
downloadw3m-0b18a8df294692c754ae4c6b29966ef72dd266b5.tar.gz
w3m-0b18a8df294692c754ae4c6b29966ef72dd266b5.zip
Merge from upstream on 2012-05-22
Diffstat (limited to 'file.c')
-rw-r--r--file.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/file.c b/file.c
index 9e63eb3..4d6376f 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"
@@ -5137,10 +5137,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;