From 4d3682eb235f15df8127eceeaf1dd907bbcabe89 Mon Sep 17 00:00:00 2001 From: Romain Bignon Date: Thu, 22 Mar 2012 21:54:46 +0100 Subject: [PATCH] adopteunmec seems to have changed its charset (refs #820) --- modules/aum/browser.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/modules/aum/browser.py b/modules/aum/browser.py index 6a5d9f64..db38e58a 100644 --- a/modules/aum/browser.py +++ b/modules/aum/browser.py @@ -251,14 +251,15 @@ class AuMBrowser(BaseBrowser): @check_login @url2id def post_mail(self, id, content): - new_content = u'' - for c in content: - try: - new_content += '&%s;' % codepoint2name[ord(c)] - except KeyError: - new_content += c + # It seems it is not needed anymore. + #new_content = u'' + #for c in content: + # try: + # new_content += '&%s;' % codepoint2name[ord(c)] + # except KeyError: + # new_content += c - content = new_content.replace('\n', '\r\n').encode('Windows-1252', 'replace') + content = content.replace('\n', '\r\n').encode('utf-8', 'replace') try: self.api_request('message', 'new', data={'memberId': id, 'message': content})