[
https://issues.apache.org/jira/browse/THRIFT-3721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186253#comment-15186253
]
Jason Heimann commented on THRIFT-3721:
---------------------------------------
<code>
#! /usr/bin/env python2.7
# -*- coding: utf-8 -*-
from thrift.protocol.TBinaryProtocol import TBinaryProtocol
from thrift.transport.TTransport import TMemoryBuffer
from thrift.Thrift import TType
class MyThriftClient(object):
def __init__(self, prot):
self._prot = prot
def myStringAPI(self, param):
self._prot.writeFieldBegin('param', TType.STRING, 1)
self._prot.writeString(param)
self._prot.writeFieldEnd()
def main():
transport = TMemoryBuffer()
protocol = TBinaryProtocol(transport)
client = MyThriftClient(protocol)
client.myStringAPI(u'三木 昌彦')
if __name__ == "__main__":
main()
<code>
> CLONE - why not add unicode strings support to python directly?
> ---------------------------------------------------------------
>
> Key: THRIFT-3721
> URL: https://issues.apache.org/jira/browse/THRIFT-3721
> Project: Thrift
> Issue Type: Bug
> Components: Python - Library
> Affects Versions: 0.8, 0.9.2
> Environment: Ubuntu 14.04.03 LTS, Ubuntu 15.10
> Reporter: Jason Heimann
> Assignee: Jake Farrell
> Labels: python, unicode
>
> i install thrift python lib by easy_install
> but in version0.8,I still didn't see the
> patch(https://issues.apache.org/jira/browse/THRIFT-395) be added in the lib
> I had to hack the code follow the patch manually
> (https://issues.apache.org/jira/secure/attachment/12404198/0003-THRIFT-395.-python-Phase-Two-of-support-for-unicode.patch)
> Can any of the developers fix the problem?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)