1
0
mirror of https://github.com/haiwen/libsearpc.git synced 2025-08-01 21:07:44 +00:00

strings in utf-8 instead of unicode when deserializing obj/objlists

This commit is contained in:
lins05 2012-05-14 15:23:35 +08:00
parent b3dd6a2e4c
commit a0d0e78e8b

View File

@ -18,6 +18,9 @@ class _SearpcObjProps(object):
value = dicts[key]
# replace hyphen with with underline
new_key = key.replace('-', '_')
# encode all strings in UTF-8
if isinstance(value, unicode):
value = value.encode('utf-8')
new_dict[new_key] = value
self._dicts = new_dict