On 21/11/2016 12:52, Daniel Gruno wrote:
The importer usually sees things as ASCII, whereas the archiver_can_ get fed input as unicode by postfix (I don't know why, but there it is). This may explain why. I think as_bytes is a safer way to archive, as it's binary.
I confirm I am using postfix. On 21/11/2016 12:54, sebb wrote:
Or it might perhaps be your locale setting. In which case the PM code needs to be changed so it is not Locale-dependent. Or perhaps it could check the Locale and fail if it was unsuitable.
The locale is set to it_IT.UTF8 on that box. Thanks. Regards.
On 21 November 2016 at 11:40, Francesco Chicchiriccò<[email protected]> wrote:Hi all, not sure but it seems that the commit below broke my scheduled import from mbox: Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.5/threading.py", line 914, in _bootstrap_inner self.run() File "import-mbox.py", line 297, in run 'source': message.as_string() File "/usr/lib/python3.5/email/message.py", line 159, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/lib/python3.5/email/generator.py", line 115, in flatten self._write(msg) File "/usr/lib/python3.5/email/generator.py", line 181, in _write self._dispatch(msg) File "/usr/lib/python3.5/email/generator.py", line 214, in _dispatch meth(msg) File "/usr/lib/python3.5/email/generator.py", line 243, in _handle_text msg.set_payload(payload, charset) File "/usr/lib/python3.5/email/message.py", line 316, in set_payload payload = payload.encode(charset.output_charset) UnicodeEncodeError: 'ascii' codec can't encode character '\ufffd' in position 3657: ordinal not in range(128) Any hint / workaround?
-- Francesco Chicchiriccò Tirasa - Open Source Excellence http://www.tirasa.net/ Member at The Apache Software Foundation Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail http://home.apache.org/~ilgrosso/
