Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.7
-
None
-
mac osx 10.6
Description
#THRIFT-395 (r959516) fixed python unicode support by adding a parameter to thrift command line for py-generator. However this will not affect fastbinary.c. A normal generated Read/Write function looks like below, notice that the function returned before reach unicode handling logic.
TType.py
def write(self, oprot): if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None: oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec))) return if self.ip is not None: oprot.writeFieldBegin('ip', TType.STRING, 6) oprot.writeString(self.ip.encode('utf-8')) oprot.writeFieldEnd()
Any suggestion for this?
Attachments
Attachments
Issue Links
- is duplicated by
-
THRIFT-3519 fastbinary does not work with -gen py:utf8strings
- Closed