Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

  • 1 commit
  • 1 file changed
  • 1 commit comment
  • 1 contributor
Commits on Apr 09, 2012
Simon Chopin laarmen Transcode the HTML text to native encoding before writing the tmp file
This way, any HTML interpreter should read the file using the default
locale and while get the non-ASCII characters right.
Showing with 2 additions and 1 deletion.
  1. +2 −1  alot/db/
3  alot/db/
@@ -9,6 +9,7 @@
from email.iterators import typed_subpart_iterator
import logging
import mailcap
+import locale
import alot.helper as helper
from alot.settings import settings
@@ -94,7 +95,7 @@ def extract_body(mail, types=None):
# write payload to tmpfile
- tmpfile.write(raw_payload)
+ tmpfile.write(unicode(raw_payload, enc).encode(locale.getdefaultlocale()[1]))
# read parameter, create handler command

Showing you all comments on commits in this comparison.

Patrick Totzke


i think this has been discussed before here: pazz#134 (search for html in the tracker).
The consensus was to not alter the msg content at all and only provide hints for the renderer (w3m most likely)
how to interpret the content:
alot will decode the quoted printable and hand over the 'charset' content-type parameter (via mailcap parameter sequences).
The renderer then interprets the given string as having this input encoding and is expected to output utf8 encoded strings.

this should work as is, i am reluctant to recode anything in between. please let me know what exactly your problem is with the
html renderer set as mentioned in the doc.
thank you,

Something went wrong with that request. Please try again.