Gnus development mailing list
 help / color / mirror / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: ding@gnus.org
Subject: Re: Override charset in <meta> tag for K H
Date: Mon, 29 Mar 2010 18:50:23 +0900	[thread overview]
Message-ID: <b4moci7zcbk.fsf@jpl.org> (raw)
In-Reply-To: <7mfx3k556d.fsf@kolon.stjernholm.org>

>>>>> Martin Stjernholm wrote:
> When an html mail is viewed externally with K H
> (gnus-article-browse-html-article), gnus-article-browse-html-parts might
> sometimes forcefully encode it to utf-8 in the temporary file. However,
> if the html already contains a <meta> with a different charset, it won't
> be changed (as is the documented behavior for mm-add-meta-html-tag). The
> result is that the browser views the utf-8 encoded article with the
> original charset.

Maybe the best is always to use the meta charset for encoding
decoded contents if it is available and is the one that Emacs
knows (recently I made emacs-w3m's shimbun do so).  However, it
doesn't look so easy to achieve in Gnus.

> I haven't dug deep enough in gnus-article-browse-html-parts to
> understand why it sometimes changes the charset, but I assume it is with
> good reason.

I neither have reason at least nor recall why I left the existing
meta tag.

> Anyway, if the html is recoded to a different charset then
> clearly the charset in the <meta> tag should be updated too. The
> attached patch fixes this in the code paths where it's forced to utf-8.

> Note that there are at least two more paths where the article goes
> through mm-encode-coding-string. Since I haven't grasped those, this
> patch doesn't touch them. The same problem might exist there too.

How about making `mm-add-meta-html-tag' always replace the existing
meta tag?  I don't imagine it causes any harm.

Regards,



  reply	other threads:[~2010-03-29  9:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-29  0:42 Martin Stjernholm
2010-03-29  9:50 ` Katsumi Yamaoka [this message]
2010-03-29 22:47   ` Martin Stjernholm
2010-03-30  4:47     ` Katsumi Yamaoka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b4moci7zcbk.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).