[Alpine-info] using w3m to view HTML attachments is pretty nice

Werner Scheinast W.Scheinast at web.de
Sat May 21 07:48:15 PDT 2011


On 20.05.11 Mike Miller wrote:


> It can display pictures in an xterm? I thought that was impossible.


Try it! It seems to work only in xterm. Other terminal emulators are too
poor in functionality.
w3m is the only program with this capability. But don't ask me how they do
it. Unfortunately, w3m is poorly documented. Feel like reading the source
code?


> Thanks for pointing this out. To clarify: I didn't use cut/paste in the

> xterm. I used pipe to filter the attachment through w3m and into a file:

>

> w3m -dump -cols 74 -T text/html > html_attachment.txt


This outputs UTF-8 text to the file. (I tested.)


> Then in the Alpine composer (Pico under the hood, I guess) I used ^R to bring

> in the html_attachment.txt file where I deleted some lines using ^K. I don't

> know if that matters, but it was "Read File" and not paste that brought the

> table into the message.


I manually decoded the base64 block in your message. It is not UTF-8. The
box drawing characters are single bytes (0x80, 0x86, 0x87, 0x8a etc.), no
UTF-8 sequences.
As I read about Alpines behaviour, it "minimizes" the character set, i.e.
it finds the smallest character set sufficient for the message to send.
For some strange reason it chose KOI8-R. Okay, I begin to understand.
The Alpine mailing list software then packs each non-ASCII message in a
multipart format, the first part base64-encoded, the second part only
some mailing list information in US-ASCII.
This is probably correct. But then there is a bug in pico which gets
confused with the box drawing characters when I want to edit the message
for reply. Can anybody acknowledge this? Try to reply on Mikes first post
and edit the text with the table.


> Regarding the "bug in Mike" question -- it is quite possible that I have a bad

> setting somewhere. I would ike to find out. What do I need to do? These are

> my locale settings:


You have generally UTF-8, which is usual today.


> LC_COLLATE=C


(I also prefer this. All others are just not bearable.)


> The following lines are from my ~/.pinerc file. The "character-set" setting

> of "ISO-8859-1" surprises me a little because I thought I had UTF-8 settings

> all over. But I know there was some discussion on this list about it, so

> maybe these settings are correct...


Is this setting not obsolete? AFAIK there are only display-, keyboard-,
posting-, and unknown-character-set.

Could you tell me the details of this (my) post here? I include now some
Russian letters: АБВГДЕЖЗИ
And I send it both to the ML and directly to you. How is it encoded in the
latter case? (The former I see myself.)

Have a nice Sunday
Werner


More information about the Alpine-info mailing list