Closed djk454772303 closed 4 years ago
thriftpy2 will call .decode('utf-8')
for string or binary type fields. You can set decode_response
to False
on your protocol factory to disable this behavior.
thriftpy2 will call
.decode('utf-8')
for string or binary type fields. You can setdecode_response
toFalse
on your protocol factory to disable this behavior.
thx. 问题解决了~
在将服务从thrift迁移到thriftpy时,请求里的字符编码变了。在thriftpy里一些字段变为了unicode编码,看着像是对原始的字符串多做了一次utf8的decode