def unicode_dict(_dict):
 r = {}
 for (k, v) in iteritems(_dict):
  r[unicode_obj(k)] = unicode_obj(v)
 return r

def unicode_dict ( _dict ) : r = { } for ( k , v ) in iteritems ( _dict ) : r [ unicode_obj ( k ) ] = unicode_obj ( v ) return r
make sure keys and values of dict is unicode .