Thriftpy / thriftpy2

Pure python approach of Apache Thrift.
MIT License
572 stars 91 forks source link

从thrift转到thriftpy时,请求的编码变了? #142

Closed djk454772303 closed 4 years ago

djk454772303 commented 4 years ago

在将服务从thrift迁移到thriftpy时,请求里的字符编码变了。在thriftpy里一些字段变为了unicode编码,看着像是对原始的字符串多做了一次utf8的decode

aisk commented 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.

djk454772303 commented 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.

thx. 问题解决了~