You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Luis Nell (Issue Comment Edited) (JIRA)" <ji...@apache.org> on 2012/02/07 21:46:59 UTC

[jira] [Issue Comment Edited] (THRIFT-1460) why not add unicode strings support to python directly?

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

Luis Nell edited comment on THRIFT-1460 at 2/7/12 8:46 PM:
-----------------------------------------------------------

This happens for me too. I need to insert the following (unicode) string into cassandra:
{code}u'Shaq\u2013Kobe feud'{code}

Getting nasty python UnicodEncodeErrors with ascii codec.

I am running cassandra 1.0.7 with pycassa 1.4.0 and the [thrift 0.8 package from PyPi|http://pypi.python.org/pypi/thrift/0.8.0].

*Edit://* I did apply the patches myself and pushed them to [a github repo|https://github.com/originell/thrift/]. Did test it with some unicode strings. Seems to work as expected.
                
      was (Author: originell):
    This happens for me too. I need to insert the following (unicode) string into cassandra:
{code}u'Shaq\u2013Kobe feud'{code}

Getting nasty python UnicodEncodeErrors with ascii codec.

I am running cassandra 1.0.7 with pycassa 1.4.0 and the [thrift 0.8 package from PyPi|http://pypi.python.org/pypi/thrift/0.8.0].

                  
> why not add unicode strings support to python directly?
> -------------------------------------------------------
>
>                 Key: THRIFT-1460
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1460
>             Project: Thrift
>          Issue Type: Bug
>          Components: Python - Library
>    Affects Versions: 0.8
>         Environment: redhat linux
>            Reporter: shen guanpu
>              Labels: python, unicode
>             Fix For: 0.9
>
>
> 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira