From dbd52ac2ca59d404bdcc29c5c90bda822f2c9334 Mon Sep 17 00:00:00 2001 From: Tatsuya Kinoshita Date: Thu, 24 May 2012 23:14:28 +0900 Subject: Merge from upstream on 2012-05-22 --- file.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'file.c') 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 #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) { + /* */ + 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; -- cgit v1.2.3