fetch email encoded in 'ISO-8859-1'/'GB18030'

Bug #1239621 reported by LIN Yu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Odoo Addons (MOVED TO GITHUB)
Invalid
Undecided
Unassigned

Bug Description

Hi,

When fetching email (both emails and attachments) which is encoded 'ISO-8859-1'/'GB18030,
I receive an error.

Reproduction procedure:
1. fetch an email encoded in 'ISO-8859-1'/'GB18030,

The traceback is :

Traceback (most recent call last):
  File "/opt/openerp/must/70/stable/addons/fetchmail/fetchmail.py", line 209, in fetch_mail
    context=context)
  File "/opt/openerp/must/70/stable/addons/mail/mail_thread.py", line 679, in message_process
    new_msg_id = model_pool.message_post(cr, uid, [thread_id], context=context, subtype='mail.mt_comment', **msg)
  File "/opt/openerp/must/70/stable/addons/mail/mail_thread.py", line 1135, in message_post
    msg_id = mail_message.create(cr, uid, values, context=context)
  File "/opt/openerp/must/70/stable/addons/mail/mail_message.py", line 750, in create
    newid = super(mail_message, self).create(cr, uid, values, context)
  File "/mnt/data/openerp/must/70/stable/server/openerp/osv/orm.py", line 4471, in create
    result += self._columns[field].set(cr, self, id_new, field, vals[field], user, rel_context) or []
  File "/mnt/data/openerp/must/70/stable/server/openerp/osv/fields.py", line 757, in set
    idnew = obj.create(cr, user, act[2], context=context)
  File "/opt/openerp/must/70/stable/addons/document/document.py", line 125, in create
    return super(document_file, self).create(cr, uid, vals, context)
  File "/mnt/data/openerp/must/70/stable/server/openerp/addons/base/ir/ir_attachment.py", line 290, in create
    return super(ir_attachment, self).create(cr, uid, values, context)
  File "/mnt/data/openerp/must/70/stable/server/openerp/osv/orm.py", line 4436, in create
    cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
  File "/mnt/data/openerp/must/70/stable/server/openerp/sql_db.py", line 161, in wrapper
    return f(self, *args, **kwargs)
  File "/mnt/data/openerp/must/70/stable/server/openerp/sql_db.py", line 226, in execute
    res = self._obj.execute(query, params)
DataError: invalid byte sequence for encoding "UTF8": 0xd0c2

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello LIN yu,

I did same test with trunk as well with 7.0 , But I m not getting any traceback while fetching that encoded mail. (encoded by ISO-8859-1' and 'GB18030' ).

So. Would you please check this again with latest ? And please provide your screen cast with more information.

Waiting for your answer..!!

Thanks

Changed in openobject-addons:
status: New → Incomplete
Revision history for this message
LIN Yu (lin-yu) wrote : Re: [Bug 1239621] Re: fetch email encoded in 'ISO-8859-1'/'GB18030'

Hi,

 From my study, I think this one is a database problem.
When saving attachments, postgresql can not store other special
characters in other codec. And OpenERP does not deal with that case yet.

I will try to the attachment that reproduce the error.

BR
On 11/29/2013 03:13 PM, Twinkle Christian(OpenERP) wrote:
> Hello LIN yu,
>
> I did same test with trunk as well with 7.0 , But I m not getting any
> traceback while fetching that encoded mail. (encoded by ISO-8859-1' and
> 'GB18030' ).
>
> So. Would you please check this again with latest ? And please provide
> your screen cast with more information.
>
> Waiting for your answer..!!
>
> Thanks
>
> ** Changed in: openobject-addons
> Status: New => Incomplete
>

--
LIN Yu

LIN Yu
/Project Manager/
--
*Elico Corporation, Shanghai
/OpenERP Premium Certified Training Partner/ *
Cell: + 86 186 1691 1351
Office: + 86 21 6211 8017/27
Skype: llccluf
<email address hidden> <mailto:<email address hidden>>
http://www.elico-corp.com

Elico Corp

Revision history for this message
Twinkle Christian(OpenERP) (tch-openerp) wrote :

Hello,

Thanks for your answer..!!

As per the comment #2 , Currently I am closing this issue, whenever you will reproduce it, then please reopen it with more information.

Regards,

Changed in openobject-addons:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.