← Back to team overview

openerp-community team mailing list archive

Re: lp:~akretion-team/openerp-product-attributes/openerp-product-attrs-image-char-fix into lp:openerp-product-attributes

 

Review: Needs Information

I don't think that openerp.tools.ustr() and unicode().encode() serve the same purpose.

openerp.tools.ustr() takes a byte string and try to convert it to unicode (with an optional default encoding or try to guess). It uses the unicode() constructor.

While unicode().encode() used in the Raphaël's code convert an unicode string to a byte string with the requested encoding.

However, I don't see why you would need the byte string here. It seems to me that open() accepts the unicode string (is it related to the filesystem?)
-- 
https://code.launchpad.net/~akretion-team/openerp-product-attributes/openerp-product-attrs-image-char-fix/+merge/173108
Your team OpenERP Community is subscribed to branch lp:openerp-product-attributes.


References