← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 718651] Re: importing a translation with arabic characters fails

 

Hello ,

I have changed the following content in the exported file and imported
back:

#. module: account
#: view:account.move.reconcile:0
msgid "Journal Entry Reconcile"
msgstr "مجلة إدخال توفي"


Thanks.

** Changed in: openobject-server
       Status: New => Invalid

-- 
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.
https://bugs.launchpad.net/bugs/718651

Title:
  importing a translation with arabic characters fails

Status in OpenERP Server:
  Invalid

Bug description:
  if i export a translation file for all modules, make my changes
  according to the desired language which is arabic in this case, and
  try to reimport it, i get an encoding error.

  Traceback (most recent call last):
    File "/usr/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 122, in wrapper
      return f(self, dbname, *args, **kwargs)
    File "/usr/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 176, in execute
      res = self.execute_cr(cr, uid, obj, method, *args, **kw)
    File "/usr/lib/python2.6/site-packages/openerp-server/osv/osv.py", line 167, in execute_cr
      return getattr(object, method)(cr, uid, *args, **kw)
    File "/usr/lib/python2.6/site-packages/openerp-server/addons/base/module/wizard/base_import_language.py", line 59, in import_lang
      tools.trans_load_data(cr, fileobj, fileformat, import_data.code, lang_name=import_data.name)
    File "/usr/lib/python2.6/site-packages/openerp-server/tools/translate.py", line 932, in trans_load_data
      trans_obj.create(cr, uid, dic)
    File "/usr/lib/python2.6/site-packages/openerp-server/addons/base/ir/ir_translation.py", line 184, in create
      ids = super(ir_translation, self).create(cursor, user, vals, context=context)
    File "/usr/lib/python2.6/site-packages/openerp-server/osv/orm.py", line 3605, in create
      cr.execute('insert into "'+self._table+'" (id'+upd0+") values ("+str(id_new)+upd1+')', tuple(upd2))
    File "/usr/lib/python2.6/site-packages/openerp-server/sql_db.py", line 78, in wrapper
      return f(self, *args, **kwargs)
    File "/usr/lib/python2.6/site-packages/openerp-server/sql_db.py", line 131, in execute
      res = self._obj.execute(query, params)
  DataError: invalid byte sequence for encoding "UTF8": 0xc3cd
  HINT:  This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding".

  the db's encoding is utf-8. if i reimport it without using any arabic
  characters, it works fine.





References