nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] A non-complaint


From: David Levine
Subject: Re: [Nmh-workers] A non-complaint
Date: Wed, 06 Aug 2014 20:29:17 -0400

Ken wrote:

> [Norm:]
> >1. The file contains a text version and non-text version of the
> >content. But mhshow ignores the text version and uses the non-text
> >version.

> So mhshow uses the best format that it knows how to display; in your
> case, it knows how to display text/html content, so that's what it
> picks.

It does that because of this line in your (Norm's) profile:

    mhshow-show-text/html: google-chrome && google-chrome %F

If you want to view some messages with a browser and some as
text, here are a couple of options:

Use a different profile and select the one you want using the MH
environment variable, depending on how you want to view the
message.  I'd hide that in shell aliases/functions/scripts.

Use "show -noc[heckmime]" to view the message as text.

Another option would be to use mhn to view the text parts of the
message as text.  You can set your profile up to view non-text
parts with whatever tools you want.  Maybe we don't want to
encourage this, but I do it.

> >2. There are several spurious occurrences of the character, 'Â' (look
> >ma, I'm storing in UTF-8) in the chrome display.

> Ummmm .... I guess it's technically a nmh problem, but there's a bunch
> of finger-pointing going on here.  I'll try to explain the issue the
> best that I can.

And very well at that.  But, when I view the message, I don't
see the 'Â' characters in chrome.  I'm using pretty much the
same setup as Norm, except for a more recent Linux (Fedora 20
vs. RHEL 6.5).

And I don't see them even if I set LANG to en_US.ISO-8859-1
or C.

Norm, here's my chrome version:
    $ google-chrome --version
    Google Chrome 31.0.1650.63

If that's not the cause, I wonder if something in your
environment is confusing chrome.  Does this help (with the
correct path to show)?

    $ env -i DISPLAY=:0.0 /usr/local/nmh/bin/show [msg]

> set if the HTML doesn't include a character set.

> Chrome is doing the right thing when it comes to HTML content
> that lacks a specific charset in the HTML content.

In this case, the HTML includes one:

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

So it's really strange.

HTML5 supports this:

    <meta charset="utf-8">

I don't see any other way, such as the command line, to let
chrome know the charset, though I might have missed it.

And an aside, I noticed that you're not using --new-window
with google-chrome, probably because it doesn't always work :-/
This is an awful way around that:

    mhshow-show-text/html: google-chrome --new-window %F; sleep 5

That really is ugly, though I don't see a way to get chrome to
not exit the process reliably until after it reads the file.

David



reply via email to

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