← Back to team overview

credativ team mailing list archive

[Bug 911781] [NEW] encoding issue with selection fields

 

Public bug reported:

When creating or updating an object, there is a check on the selection fields :
method _check_selection_field_value(self, cr, uid, field, value, context=None) in orm.py (line 2327 for me).
My page encoding and DB are UTF-8, but when you process the value, if you have accents (ie é or à), this error happens :

  File "orm.py", line 3404, in write
  File "orm.py", line 2330, in _check_selection_field_value
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)

My temporary solution is to decode the value (value =
value.decode('utf-8'))

Is this normal?

Thank you,
David.

** Affects: openobject-server
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of OpenERP
Framework Experts, which is subscribed to OpenERP Server.
https://bugs.launchpad.net/bugs/911781

Title:
  encoding issue with selection fields

Status in OpenERP Server:
  New

Bug description:
  When creating or updating an object, there is a check on the selection fields :
  method _check_selection_field_value(self, cr, uid, field, value, context=None) in orm.py (line 2327 for me).
  My page encoding and DB are UTF-8, but when you process the value, if you have accents (ie é or à), this error happens :

    File "orm.py", line 3404, in write
    File "orm.py", line 2330, in _check_selection_field_value
  UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)

  My temporary solution is to decode the value (value =
  value.decode('utf-8'))

  Is this normal?

  Thank you,
  David.

To manage notifications about this bug go to:
https://bugs.launchpad.net/openobject-server/+bug/911781/+subscriptions


Follow ups

References