Summary: | elog QA mails are misformatted | ||
---|---|---|---|
Product: | Portage Development | Reporter: | Toralf Förster <toralf> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | pentek.imre |
Priority: | Normal | Keywords: | InVCS |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 381649 | ||
Attachments: |
mbox mail
elog file with python2, call MIMEText.set_charset("UTF-8") |
Description
Toralf Förster
2011-10-07 16:11:26 UTC
There are lots of character set encoding issues to consider here: 1) What encoding is the original message? 2) What encoding is the email content? 3) Is your email client using the correct encoding to decode the message? 4) What encoding is your elog reader (text editor, pager, etc..) using to decode the log in /var/log/portage/elog? Your locale setting (LANG variable) probably has a role in this, so what is that? Also, please attach the raw email message as it was delivered to your email client. what is the Content-Type: header of the emails that look garbled Created attachment 289087 [details]
mbox mail
tfoerste@n22 ~ $ echo $LANG
en_US.utf8
Created attachment 289089 [details]
elog file
tfoerste@n22 ~ $ echo $LANG
en_US.utf8
tfoerste@n22 ~ $ env | grep ^LC
tfoerste@n22 ~ $
well - it seems to be a problem with KMail1 to set the correct encoding font utf8 (but it worked in the past and I didn't upgraded it) here is the problem: Content-Type: text/plain; charset="us-ascii" I'm not sure what sends the email, but if it's Python smtp lib or something, I bet the Content-Type has to be set explicitly according to the environment, UTF-8 in your case. Created attachment 289173 [details, diff]
with python2, call MIMEText.set_charset("UTF-8")
Hopefully this will fix it. Save as /tmp/mimetext_charset.patch, and apply as follows:
patch /usr/lib/portage/pym/portage/mail.py /tmp/mimetext_charset.patch
(In reply to comment #7) > Hopefully this will fix it. yes :-) Thanks for testing. This is in git now: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=e606fa6e8c23bff65618d73dfc19b8dd301460e1 This is fixed in 2.1.10.24 and 2.2.0_alpha64. *** Bug 228565 has been marked as a duplicate of this bug. *** |