Re: [PATCH] pwclient: Fix encoding problems

2016-12-15 Thread Thomas Monjalon
2016-12-15 17:56, Robin Jarry: > All data returned by the xmlrpc object is unicode decoded with 'utf-8' (on > python 3, unicode == str). Add from __future__ import unicode_literals > to make sure that everything is unicode and avoid surprises. > > On python 2, printing unicode to stdout causes it

[PATCH] pwclient: Fix encoding problems

2016-12-15 Thread Robin Jarry
All data returned by the xmlrpc object is unicode decoded with 'utf-8' (on python 3, unicode == str). Add from __future__ import unicode_literals to make sure that everything is unicode and avoid surprises. On python 2, printing unicode to stdout causes it to be encoded to str (byte string) with t

Re: [PATCH v2 3/3] pwclient: Fix Python 3 encoding of received strings

2016-12-15 Thread Thomas Monjalon
2016-12-13 11:37, Thomas Monjalon: > The conversion encode("utf-8") makes a byte stream which is > poorly printed with Python 3. [...] > for patch_id in non_empty(h, patch_ids): > s = rpc.patch_get_mbox(patch_id) > if len(s) > 0: > -