[Erp5-report] r26498 - /erp5/trunk/products/ERP5/Document/EmailDocument.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Sun Apr 19 14:33:52 CEST 2009
Author: jp
Date: Sun Apr 19 14:33:51 2009
New Revision: 26498
URL: http://svn.erp5.org?rev=26498&view=rev
Log:
Guess encoding if the provided one does not exist.
Modified:
erp5/trunk/products/ERP5/Document/EmailDocument.py
Modified: erp5/trunk/products/ERP5/Document/EmailDocument.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/Document/EmailDocument.py?rev=26498&r1=26497&r2=26498&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/Document/EmailDocument.py [utf8] (original)
+++ erp5/trunk/products/ERP5/Document/EmailDocument.py [utf8] Sun Apr 19 14:33:51 2009
@@ -137,7 +137,7 @@
text = text.decode(encoding).encode('utf-8')
else:
text = text.decode().encode('utf-8')
- except UnicodeDecodeError:
+ except (UnicodeDecodeError, LookupError), error_message:
encoding = self._guessEncoding(text)
if encoding is not None:
text = text.decode(encoding).encode('utf-8')
More information about the Erp5-report
mailing list