Re: elinks + mutt: problems with utf-8 encoding

Joost Kremers <[email protected]>
Newsgroups gmane.comp.web.elinks.user
Message-ID <20081011111620.GA3384@enterprise>
Hi Ahmed,

Thanks for your reply.

On Fri, Oct 10, 2008 at 04:54:35PM +0200, أحمد المحمودي wrote:
>   I use elinks as email viewer in mutt too, and my consoles are utf-8, 
>   and I got not problem.
> 
>   I don't use the -codepage option in the mailcap, yet there is a 
>   setting in elinks Option manager: Document->Dump output->Codepage, I 
>   set that to "System".

It's set to "System" in my case as well.

>   To test that out, try saving a german HTML file on your disk (say 
>   /tmp/test.html).
> 
>   Then run: elinks -dump -force-html /tmp/test.html, and see if it gets 
>   displayed properly.

Your suggestion helped me to narrow down the problem a bit. It turns out
that the html mails that elinks doesn't dump properly are not encoded in
utf-8, and when mutt pipes the body to elinks, it doesn't change the
encoding. So elinks is getting a (e.g.) iso-8859-1 encoded text that it
tries to treat as utf-8 (because the message body doesn't specify its
iso-8859-1 encoding). When I save the message body to disk and change its
encoding to utf-8 (I did that through Emacs), elinks can dump it correctly.

So I guess I need to figure out how to make sure mutt reencodes the message
body to utf-8, unless of course if there's some way to get elinks guess the
encoding from the file's contents, rather than assume its utf-8.

BTW, I notice your name's in Arabic (although in my case the characters are
displayed backward and unconnected.) Do you use mutt to read/write mail in
Arabic? If so, may I ask which terminal emulator you use, and which editor?
I've tried a couple of times to get mutt to handle Arabic mail properly,
but never got it right...

Thanks,

Joost


-- 
Joost Kremers, PhD
University of Frankfurt
Institute for Cognitive Linguistics
Grüneburgplatz 1
60629 Frankfurt am Main, Germany
_______________________________________________
elinks-users mailing list
[email protected]
http://linuxfromscratch.org/mailman/listinfo/elinks-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.