[ 
https://issues.apache.org/jira/browse/THRIFT-3721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15186267#comment-15186267
 ] 

Aki Sukegawa edited comment on THRIFT-3721 at 3/9/16 1:52 AM:
--------------------------------------------------------------

utf8 is handled by "-gen py:utf8_strings" generator option (or something 
similar, refer to --help) in Thrift <= 0.9.3.
It simply generates encode and decode method calls inside string field read 
write methods.
If you're using a protocol object directory, you need to do the conversion 
yourself.

As to the "why" part, it's to avoid breaking existing code, as discussed in the 
original issue that contains the patch.


was (Author: nsuke):
utf8 is handled by "-gen py:utf8_strings" generator option (or something 
similar, refer to --help) in Thrift <= 0.9.3.
It simply generates encode and decode method calls inside string field read 
write methods.
If you're using a protocol object directory, you need to do the conversion 
yourself.

> 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)

Reply via email to