From bddffbe8e69666d550f872e815975593c0a33ef0 Mon Sep 17 00:00:00 2001
From: Stephane Wirtel <stephane@openerp.com>
Date: Thu, 6 May 2010 18:41:47 +0200
Subject: [PATCH] [FIX] fetchmail: Decode correcly the body and the subject of
 the emails (ter)

bzr revid: stephane@openerp.com-20100506164147-vpfqlk3ppvqqkd9n
---
 addons/fetchmail/fetchmail.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/addons/fetchmail/fetchmail.py b/addons/fetchmail/fetchmail.py
index 564c1c11e548..d8ae92654e33 100644
--- a/addons/fetchmail/fetchmail.py
+++ b/addons/fetchmail/fetchmail.py
@@ -195,6 +195,7 @@ class email_server(osv.osv):
         msg['message-id'] = message_id
 
         def _decode_header(txt):
+            txt = txt.replace('\r', '')
             return ' '.join(map(lambda (x, y): unicode(x, y or 'ascii'), decode_header(txt)))
         
         if 'Subject' in fields:
-- 
GitLab